From fd04967676f9224226d304945b51187e94c23253 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Mon, 8 Jan 2018 21:37:51 +0100 Subject: [PATCH] :bug: fixed copy-paste error --- src/json.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 2aef1594..e7465e29 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6377,7 +6377,7 @@ class binary_writer oa->write_character(static_cast('I')); // int16 write_number(static_cast(n)); } - else if (-(std::numeric_limits::min)() <= n and n <= (std::numeric_limits::max)()) + else if ((std::numeric_limits::min)() <= n and n <= (std::numeric_limits::max)()) { oa->write_character(static_cast('l')); // int32 write_number(static_cast(n)); @@ -6419,7 +6419,7 @@ class binary_writer { return 'I'; } - else if (-(std::numeric_limits::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits::max)()) + else if ((std::numeric_limits::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits::max)()) { return 'l'; } @@ -6444,7 +6444,7 @@ class binary_writer { return 'I'; } - else if (-(std::numeric_limits::min)() <= j.m_value.number_unsigned and j.m_value.number_unsigned <= (std::numeric_limits::max)()) + else if ((std::numeric_limits::min)() <= j.m_value.number_unsigned and j.m_value.number_unsigned <= (std::numeric_limits::max)()) { return 'l'; }