tools/source/generic/fract.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8571fa585148c611d5e7f03586016db6595533c0
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Jul 4 12:39:15 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Jul 10 19:06:23 2025 +0200

    reuse number_of_bits
    
    Change-Id: Ice13574ecdec286fc7b410984fdaf5e168ea46b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187391
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 7dfddf50a880..8c7c00134adc 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -20,6 +20,7 @@
 #include <tools/fract.hxx>
 #include <tools/debug.hxx>
 #include <o3tl/hash_combine.hxx>
+#include <o3tl/numeric.hxx>
 #include <o3tl/safeint.hxx>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
@@ -34,7 +35,7 @@
 static boost::rational<sal_Int32> rational_FromDouble(double dVal);
 static void rational_ReduceInaccurate(boost::rational<sal_Int32>& rRational, 
unsigned nSignificantBits);
 // Find the number of bits required to represent this number
-static int impl_NumberOfBits(sal_uInt32 nNum) { return 32 - 
std::countl_zero(nNum); }
+static int impl_NumberOfBits(sal_uInt32 nNum) { return 
o3tl::number_of_bits(nNum); }
 
 static boost::rational<sal_Int32> toRational(sal_Int32 n, sal_Int32 d)
 {

Reply via email to