🚨 fix warnings

This commit is contained in:
Niels Lohmann 2020-07-21 23:00:56 +02:00
parent 8344857764
commit 8b14c9b305
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
4 changed files with 8 additions and 8 deletions

View file

@ -2279,7 +2279,7 @@ class binary_reader
success = false; success = false;
break; break;
} }
result.push_back(std::char_traits<char_type>::to_char_type(current)); result.push_back(static_cast<typename string_t::value_type>(current));
}; };
return success; return success;
} }

View file

@ -7507,7 +7507,7 @@ class basic_json
const bool allow_exceptions = true, const bool allow_exceptions = true,
const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)
{ {
return from_cbor(ptr, ptr + len, strict, tag_handler); return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler);
} }

View file

@ -8264,7 +8264,7 @@ class binary_reader
success = false; success = false;
break; break;
} }
result.push_back(std::char_traits<char_type>::to_char_type(current)); result.push_back(static_cast<typename string_t::value_type>(current));
}; };
return success; return success;
} }
@ -23786,7 +23786,7 @@ class basic_json
const bool allow_exceptions = true, const bool allow_exceptions = true,
const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)
{ {
return from_cbor(ptr, ptr + len, strict, tag_handler); return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler);
} }

View file

@ -2558,7 +2558,7 @@ TEST_CASE("Tagged values")
SECTION("0xC6..0xD4") SECTION("0xC6..0xD4")
{ {
for (std::uint8_t b : for (auto b : std::vector<std::uint8_t>
{ {
0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4
}) })