Skip to content

Commit

Permalink
amalgamate
Browse files Browse the repository at this point in the history
  • Loading branch information
slowriot committed Jan 10, 2025
1 parent df79b3f commit 36ce984
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10003,7 +10003,7 @@ class binary_reader
case 0x11: // uint64
{
std::uint64_t value{};
return get_number<std::uint64_t, true>(input_format_t::bson, value) && sax->number_integer(value);
return get_number<std::uint64_t, true>(input_format_t::bson, value) && sax->number_unsigned(value);
}

case 0x12: // int64
Expand All @@ -10012,11 +10012,6 @@ class binary_reader
return get_number<std::int64_t, true>(input_format_t::bson, value) && sax->number_integer(value);
}

case 0x11: // uint64
{
std::uint64_t value{};
return get_number<std::uint64_t, true>(input_format_t::bson, value) && sax->number_unsigned(value);
}

default: // anything else not supported (yet)
{
Expand Down Expand Up @@ -16738,7 +16733,7 @@ class binary_writer
write_bson_entry_header(name, 0x10 /* int32 */);
write_number<std::int32_t>(static_cast<std::int32_t>(j.m_data.m_value.number_unsigned), true);
}
else if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint64_t>::max)()))
else if (j.m_data.m_value.number_unsigned <= std::numeric_limits<std::uint64_t>::max())
{
write_bson_entry_header(name, 0x11 /* uint64 */);
write_number<std::uint64_t>(static_cast<std::uint64_t>(j.m_data.m_value.number_unsigned), true);
Expand Down

0 comments on commit 36ce984

Please sign in to comment.