mirror of
https://github.com/nlohmann/json.git
synced 2026-11-05 04:09:22 +00:00
⚗️ add Hedley annotations
This commit is contained in:
19 files changed
+3689
-642
No files matched your search
@@ -8,6 +8,7 @@
|
||||
#include <string> // string
|
||||
|
||||
#include <nlohmann/detail/input/binary_reader.hpp>
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
#include <nlohmann/detail/output/output_adapters.hpp>
|
||||
|
||||
namespace nlohmann
|
||||
@@ -714,7 +715,7 @@ class binary_writer
|
||||
static std::size_t calc_bson_entry_header_size(const string_t& name)
|
||||
{
|
||||
const auto it = name.find(static_cast<typename string_t::value_type>(0));
|
||||
if (JSON_UNLIKELY(it != BasicJsonType::string_t::npos))
|
||||
if (HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))
|
||||
{
|
||||
JSON_THROW(out_of_range::create(409,
|
||||
"BSON key cannot contain code point U+0000 (at byte " + std::to_string(it) + ")"));
|
||||
|
||||
Reference in new issue
Block a user