1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

Merge pull request #2053 from nlohmann/gcc10warnings

Fix GCC compiler warnings
This commit is contained in:
Niels Lohmann
2020-04-20 08:05:42 +02:00
committed by GitHub
4 changed files with 11 additions and 13 deletions

View File

@ -15494,7 +15494,7 @@ class serializer
: (0xFFu >> type) & (byte);
std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
assert(0 <= index and index < 400);
assert(index < 400);
state = utf8d[index];
return state;
}
@ -16376,9 +16376,9 @@ class basic_json
struct internal_binary_t : public BinaryType
{
using BinaryType::BinaryType;
internal_binary_t() : BinaryType() {}
internal_binary_t(BinaryType const& bint) : BinaryType(bint) {}
internal_binary_t(BinaryType&& bint) : BinaryType(std::move(bint)) {}
internal_binary_t() noexcept(noexcept(BinaryType())) : BinaryType() {}
internal_binary_t(BinaryType const& bint) noexcept(noexcept(BinaryType(bint))) : BinaryType(bint) {}
internal_binary_t(BinaryType&& bint) noexcept(noexcept(BinaryType(std::move(bint)))) : BinaryType(std::move(bint)) {}
// TOOD: If minimum C++ version is ever bumped to C++17, this field
// deserves to be a std::optional
@ -22164,7 +22164,6 @@ class basic_json
input_format_t format = input_format_t::json,
const bool strict = true)
{
assert(sax);
return format == input_format_t::json
? parser(std::move(i)).sax_parse(sax, strict)
: detail::binary_reader<basic_json, SAX>(std::move(i)).sax_parse(format, sax, strict);