Skip to content

Commit

Permalink
🚨 fix C4244 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 14, 2021
1 parent 0a0eb7a commit 1aceeff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/nlohmann/detail/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ std::size_t hash(const BasicJsonType& j)
auto seed = combine(type, j.get_binary().size());
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
seed = combine(seed, h);
seed = combine(seed, j.get_binary().subtype());
seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype()));
for (const auto byte : j.get_binary())
{
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
Expand Down
2 changes: 1 addition & 1 deletion single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5266,7 +5266,7 @@ std::size_t hash(const BasicJsonType& j)
auto seed = combine(type, j.get_binary().size());
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
seed = combine(seed, h);
seed = combine(seed, j.get_binary().subtype());
seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype()));
for (const auto byte : j.get_binary())
{
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
Expand Down

0 comments on commit 1aceeff

Please sign in to comment.