1
0
mirror of https://github.com/nlohmann/json.git synced 2025-08-07 18:02:57 +03:00

Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows

 Conflicts:
	include/nlohmann/detail/input/binary_reader.hpp
	include/nlohmann/detail/input/json_sax.hpp
	include/nlohmann/detail/input/lexer.hpp
	include/nlohmann/detail/input/parser.hpp
	include/nlohmann/detail/json_pointer.hpp
	include/nlohmann/detail/output/serializer.hpp
	include/nlohmann/json.hpp
	single_include/nlohmann/json.hpp
This commit is contained in:
Niels Lohmann
2020-07-11 14:04:40 +02:00
28 changed files with 1441 additions and 910 deletions

View File

@@ -2,7 +2,6 @@
#include <algorithm> // generate_n
#include <array> // array
#include <cassert> // assert
#include <cmath> // ldexp
#include <cstddef> // size_t
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
@@ -109,7 +108,7 @@ class binary_reader
break;
default: // LCOV_EXCL_LINE
assert(false); // LCOV_EXCL_LINE
JSON_ASSERT(false); // LCOV_EXCL_LINE
}
// strict mode: next byte must be EOF
@@ -717,8 +716,8 @@ class binary_reader
{
const int exp = (half >> 10u) & 0x1Fu;
const unsigned int mant = half & 0x3FFu;
assert(0 <= exp&& exp <= 32);
assert(mant <= 1024);
JSON_ASSERT(0 <= exp&& exp <= 32);
JSON_ASSERT(mant <= 1024);
switch (exp)
{
case 0:
@@ -2295,7 +2294,7 @@ class binary_reader
break;
default: // LCOV_EXCL_LINE
assert(false); // LCOV_EXCL_LINE
JSON_ASSERT(false); // LCOV_EXCL_LINE
}
return error_msg + " " + context + ": " + detail;