mirror of
https://github.com/nlohmann/json.git
synced 2026-11-11 14:41:33 +00:00
Compare commits
6
Commits
af60d07e89
...
1f519fb963
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f519fb963 | ||
|
|
288b83fd6a | ||
|
|
2ddee130c9 | ||
|
|
6b89f87e4a | ||
|
|
dbf7756f7b | ||
|
|
1ee958e49c |
No files matched your search
@@ -1148,10 +1148,8 @@ class binary_reader
|
||||
}
|
||||
}
|
||||
|
||||
/// read a single- or double-precision float (kept out of
|
||||
/// parse_cbor_value, which is inlined into parse_cbor_internal)
|
||||
/// read a single- or double-precision float
|
||||
template<typename NumberType>
|
||||
JSON_HEDLEY_NEVER_INLINE
|
||||
bool get_cbor_float()
|
||||
{
|
||||
NumberType number{};
|
||||
@@ -4474,7 +4472,12 @@ class binary_reader
|
||||
`char_traits<char_type>::eof()` in that case.
|
||||
|
||||
@return character read from the input
|
||||
|
||||
@note always inlined: GCC otherwise stops inlining the stream adapter's
|
||||
get_character() into parse_cbor_internal once that function grows
|
||||
(+0.45 % instructions for CBOR from a std::istringstream with GCC 13)
|
||||
*/
|
||||
JSON_HEDLEY_ALWAYS_INLINE
|
||||
char_int_type get()
|
||||
{
|
||||
++chars_read;
|
||||
|
||||
Generated
+6
-3
@@ -18925,10 +18925,8 @@ class binary_reader
|
||||
}
|
||||
}
|
||||
|
||||
/// read a single- or double-precision float (kept out of
|
||||
/// parse_cbor_value, which is inlined into parse_cbor_internal)
|
||||
/// read a single- or double-precision float
|
||||
template<typename NumberType>
|
||||
JSON_HEDLEY_NEVER_INLINE
|
||||
bool get_cbor_float()
|
||||
{
|
||||
NumberType number{};
|
||||
@@ -22251,7 +22249,12 @@ class binary_reader
|
||||
`char_traits<char_type>::eof()` in that case.
|
||||
|
||||
@return character read from the input
|
||||
|
||||
@note always inlined: GCC otherwise stops inlining the stream adapter's
|
||||
get_character() into parse_cbor_internal once that function grows
|
||||
(+0.45 % instructions for CBOR from a std::istringstream with GCC 13)
|
||||
*/
|
||||
JSON_HEDLEY_ALWAYS_INLINE
|
||||
char_int_type get()
|
||||
{
|
||||
++chars_read;
|
||||
|
||||
@@ -4787,7 +4787,8 @@ TEST_CASE("BJData optimized arrays from contiguous and non-contiguous input")
|
||||
std::string bytewise_error;
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_bjdata(contiguous));
|
||||
json _;
|
||||
_ = json::from_bjdata(contiguous);
|
||||
}
|
||||
catch (const json::exception& e)
|
||||
{
|
||||
@@ -4795,7 +4796,8 @@ TEST_CASE("BJData optimized arrays from contiguous and non-contiguous input")
|
||||
}
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_bjdata(bytewise.begin(), bytewise.end()));
|
||||
json _;
|
||||
_ = json::from_bjdata(bytewise.begin(), bytewise.end());
|
||||
}
|
||||
catch (const json::exception& e)
|
||||
{
|
||||
|
||||
@@ -2275,7 +2275,8 @@ TEST_CASE("MessagePack arrays of scalars from contiguous and non-contiguous inpu
|
||||
std::string bytewise_error;
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_msgpack(contiguous));
|
||||
json _;
|
||||
_ = json::from_msgpack(contiguous);
|
||||
}
|
||||
catch (const json::parse_error& e)
|
||||
{
|
||||
@@ -2283,7 +2284,8 @@ TEST_CASE("MessagePack arrays of scalars from contiguous and non-contiguous inpu
|
||||
}
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_msgpack(bytewise.begin(), bytewise.end()));
|
||||
json _;
|
||||
_ = json::from_msgpack(bytewise.begin(), bytewise.end());
|
||||
}
|
||||
catch (const json::parse_error& e)
|
||||
{
|
||||
|
||||
@@ -3436,7 +3436,8 @@ TEST_CASE("UBJSON optimized arrays from contiguous and non-contiguous input")
|
||||
std::string bytewise_error;
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_ubjson(contiguous));
|
||||
json _;
|
||||
_ = json::from_ubjson(contiguous);
|
||||
}
|
||||
catch (const json::exception& e)
|
||||
{
|
||||
@@ -3444,7 +3445,8 @@ TEST_CASE("UBJSON optimized arrays from contiguous and non-contiguous input")
|
||||
}
|
||||
try
|
||||
{
|
||||
static_cast<void>(json::from_ubjson(bytewise.begin(), bytewise.end()));
|
||||
json _;
|
||||
_ = json::from_ubjson(bytewise.begin(), bytewise.end());
|
||||
}
|
||||
catch (const json::exception& e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user