File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -445,14 +445,14 @@ NAZARA_WARNING_POP()
445445 else
446446 return 0 ;
447447#else
448+ unsigned long index = 0 ;
448449 if (_BitScanReverse (&index, SafeCast<unsigned long >(number >> 32 )) != 0 )
449450 return index + 33 ;
450- else
451- return 0 ;
452451
453- unsigned long index = 0 ;
454452 if (_BitScanReverse (&index, SafeCast<unsigned long >(number & 0xFFFFFFFF )) != 0 )
455453 return index + 1 ;
454+ else
455+ return 0 ;
456456#endif
457457 }
458458#elif defined(NAZARA_COMPILER_CLANG) || defined(NAZARA_COMPILER_GCC)
Original file line number Diff line number Diff line change @@ -82,17 +82,6 @@ void TestFindLastBit()
8282 {
8383 value |= T (1 ) << i;
8484 INFO (value);
85-
86- if constexpr (sizeof (T) == sizeof (long long ))
87- CHECK (Nz::BitCount<T> -__builtin_clzll (static_cast <long long >(value) == i + 1 ));
88- else if constexpr (sizeof (T) == sizeof (long ))
89- CHECK (Nz::BitCount<T> - __builtin_clzl (static_cast <long long >(value) == i + 1 ));
90- else
91- {
92- static_assert (sizeof (T) <= sizeof (long ));
93- CHECK (Nz::BitCount<T> - __builtin_clz (static_cast <long long >(value) == i + 1 ));
94- }
95-
9685 CHECK (Nz::FindLastBit (value) == i + 1 );
9786 }
9887}
You can’t perform that action at this time.
0 commit comments