Skip to content

Commit

Permalink
Merge pull request #2299 from nlohmann/fix_warnings
Browse files Browse the repository at this point in the history
Fix unused parameter
  • Loading branch information
nlohmann authored Jul 22, 2020
2 parents 2cd10a7 + 8b14c9b commit 484029b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/nlohmann/detail/input/binary_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,7 @@ class binary_reader
success = false;
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;
}
Expand Down
2 changes: 1 addition & 1 deletion include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7507,7 +7507,7 @@ class basic_json
const bool allow_exceptions = true,
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);
}


Expand Down
4 changes: 2 additions & 2 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8264,7 +8264,7 @@ class binary_reader
success = false;
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;
}
Expand Down Expand Up @@ -23786,7 +23786,7 @@ class basic_json
const bool allow_exceptions = true,
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);
}


Expand Down
8 changes: 4 additions & 4 deletions test/src/unit-cbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2558,10 +2558,10 @@ TEST_CASE("Tagged values")

SECTION("0xC6..0xD4")
{
for (std::uint8_t b :
{
0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4
})
for (auto b : std::vector<std::uint8_t>
{
0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4
})
{
// add tag to value
auto v_tagged = v;
Expand Down

0 comments on commit 484029b

Please sign in to comment.