diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index e938e42c5..864561cf3 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -2288,8 +2288,8 @@ class binary_reader unsigned int half = (byte1 << 8) + byte2; const double val = [&half] { - unsigned int exp = (half >> 10) & 0x1F; - unsigned int mant = half & 0x3FF; + const int exp = (half >> 10) & 0x1F; + const int mant = half & 0x3FF; JSON_ASSERT(0 <= exp&& exp <= 32); JSON_ASSERT(0 <= mant&& mant <= 1024); switch (exp) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 80e367588..134713fd3 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -10664,8 +10664,8 @@ class binary_reader unsigned int half = (byte1 << 8) + byte2; const double val = [&half] { - unsigned int exp = (half >> 10) & 0x1F; - unsigned int mant = half & 0x3FF; + const int exp = (half >> 10) & 0x1F; + const int mant = half & 0x3FF; JSON_ASSERT(0 <= exp&& exp <= 32); JSON_ASSERT(0 <= mant&& mant <= 1024); switch (exp)