mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 17:37:15 +00:00
Mark the unsigned long of the MSVC bit scans for cpplint
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+2
-2
@@ -30,7 +30,7 @@ inline int count_leading_zeros(std::uint64_t x) noexcept
|
|||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
return __builtin_clzll(x);
|
return __builtin_clzll(x);
|
||||||
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64))
|
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64))
|
||||||
unsigned long index = 0;
|
unsigned long index = 0; // NOLINT(runtime/int): the type _BitScan*64 takes
|
||||||
_BitScanReverse64(&index, x);
|
_BitScanReverse64(&index, x);
|
||||||
return 63 - static_cast<int>(index);
|
return 63 - static_cast<int>(index);
|
||||||
#else
|
#else
|
||||||
@@ -53,7 +53,7 @@ inline int count_trailing_zeros(std::uint64_t x) noexcept
|
|||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
return __builtin_ctzll(x);
|
return __builtin_ctzll(x);
|
||||||
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64))
|
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64))
|
||||||
unsigned long index = 0;
|
unsigned long index = 0; // NOLINT(runtime/int): the type _BitScan*64 takes
|
||||||
_BitScanForward64(&index, x);
|
_BitScanForward64(&index, x);
|
||||||
return static_cast<int>(index);
|
return static_cast<int>(index);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in new issue
Block a user