From 3caf0e7cdba9fdbf59831a788b68fa4370983f32 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 10 Oct 2026 11:07:53 +0200 Subject: [PATCH] Mark the unsigned long of the MSVC bit scans for cpplint Signed-off-by: Niels Lohmann --- include/nlohmann/detail/bit_ops.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/bit_ops.hpp b/include/nlohmann/detail/bit_ops.hpp index b3bf08557..3daefbe9d 100644 --- a/include/nlohmann/detail/bit_ops.hpp +++ b/include/nlohmann/detail/bit_ops.hpp @@ -30,7 +30,7 @@ inline int count_leading_zeros(std::uint64_t x) noexcept #if defined(__GNUC__) || defined(__clang__) return __builtin_clzll(x); #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); return 63 - static_cast(index); #else @@ -53,7 +53,7 @@ inline int count_trailing_zeros(std::uint64_t x) noexcept #if defined(__GNUC__) || defined(__clang__) return __builtin_ctzll(x); #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); return static_cast(index); #else