From f5d44c73e4459f6dfcf0113532cd8a2278a6d381 Mon Sep 17 00:00:00 2001 From: IRainman Date: Tue, 30 Dec 2025 21:02:50 +0300 Subject: [PATCH] compilation fix. --- include/fast_float/float_common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 079eb6f..76c35ad 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -414,7 +414,7 @@ leading_zeroes(uint64_t input_num) noexcept { #if defined(__AVX2__) // use lzcnt on MSVC only on AVX2 capable CPU's that all have this BMI // instruction - return __lzcnt64(x); + return __lzcnt64(input_num); #elif defined(_M_X64) || defined(_M_ARM64) unsigned long leading_zero; // Search the mask data from most significant bit (MSB) @@ -425,13 +425,13 @@ leading_zeroes(uint64_t input_num) noexcept { return static_cast(leading_zeroes_generic(input_num)); #endif #elif __has_builtin(__builtin_clzll) - return static_cast(__builtin_clzll(x)); + return static_cast(__builtin_clzll(input_num)); #else // Unlike MSVC, clang and gcc recognize this implementation and replace // it with the assembly instructions which are appropriate for the // target (lzcnt or bsr + zero handling). int n = 64; - for (; leading_zero > 0; leading_zero >>= 1) + for (; input_num > 0; input_num >>= 1) --n; return static_cast(n); #endif