mirror of
https://github.com/nlohmann/json.git
synced 2025-07-31 10:24:23 +03:00
🚨 fix C4244 warning
This commit is contained in:
@ -103,7 +103,7 @@ std::size_t hash(const BasicJsonType& j)
|
|||||||
auto seed = combine(type, j.get_binary().size());
|
auto seed = combine(type, j.get_binary().size());
|
||||||
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
|
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
|
||||||
seed = combine(seed, h);
|
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())
|
for (const auto byte : j.get_binary())
|
||||||
{
|
{
|
||||||
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
|
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
|
||||||
|
@ -5266,7 +5266,7 @@ std::size_t hash(const BasicJsonType& j)
|
|||||||
auto seed = combine(type, j.get_binary().size());
|
auto seed = combine(type, j.get_binary().size());
|
||||||
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
|
const auto h = std::hash<bool> {}(j.get_binary().has_subtype());
|
||||||
seed = combine(seed, h);
|
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())
|
for (const auto byte : j.get_binary())
|
||||||
{
|
{
|
||||||
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
|
seed = combine(seed, std::hash<std::uint8_t> {}(byte));
|
||||||
|
Reference in New Issue
Block a user