mirror of
https://github.com/nlohmann/json.git
synced 2026-10-04 05:30:31 +00:00
Fix the BON8 CI failures
- compare the float in write_bon8_float with number_float_t constants, so GCC does not warn about a float-to-double conversion - mark check_bon8_utf8's context as used when exceptions are disabled - choose the compact float prefix in a helper rather than with nested conditional operators (clang-tidy) - use auto for the cast in the BON8 integer reader (clang-tidy) - write the int32 minimum test values as long long literals (MSVC C4146) Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -3509,7 +3509,7 @@ class binary_reader
|
||||
}
|
||||
|
||||
const bool negative = second >= 0xC0;
|
||||
std::int64_t value = static_cast<std::int64_t>(negative ? (second & 0x3F) : second);
|
||||
auto value = static_cast<std::int64_t>(negative ? (second & 0x3F) : second);
|
||||
std::int64_t offset = 0;
|
||||
int extra_bytes = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user