Fix C4365 (signed/unsigned mismatch) warning on 32-bit Windows

This commit is contained in:
Louis Wilson 2023-04-20 16:00:21 -07:00
parent e7d6eb6794
commit ba5b0e3325

View File

@ -225,7 +225,7 @@ inline auto clzll(uint64_t x) -> int {
_BitScanReverse64(&r, x);
# else
// Scan the high 32 bits.
if (_BitScanReverse(&r, static_cast<uint32_t>(x >> 32))) return 63 ^ (r + 32);
if (_BitScanReverse(&r, static_cast<uint32_t>(x >> 32))) return 63 ^ static_cast<int>(r + 32);
// Scan the low 32 bits.
_BitScanReverse(&r, static_cast<uint32_t>(x));
# endif