From dacdde84352a2fe004f2dafd969cbac656749e81 Mon Sep 17 00:00:00 2001 From: Anshul Date: Tue, 23 Apr 2024 19:04:35 +0530 Subject: [PATCH] Removing unnecessary static casting --- include/nlohmann/detail/output/binary_writer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 4bf4c72fce..87add0eb15 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1085,7 +1085,7 @@ class binary_writer write_bson_entry_header(name, 0x12 /* int64 */); write_number(static_cast(j.m_data.m_value.number_unsigned), true); } - else if (j.m_data.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits::max)()) { write_bson_entry_header(name, 11 /* uint64 */); write_number(static_cast(j.m_data.m_value.number_unsigned), true);