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

This commit is contained in:
Louis Wilson 2023-04-20 17:36:05 -07:00 committed by GitHub
parent e7d6eb6794
commit 93e81bb5d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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