diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index 5d6f3293e..cbd768f11 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -1345,7 +1345,7 @@ class serializer } // use a pointer to fill the buffer - auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) + auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto) number_unsigned_t abs_value; @@ -1519,7 +1519,7 @@ class serializer */ number_unsigned_t remove_sign(number_integer_t x) noexcept { - JSON_ASSERT(x < 0 && x < (std::numeric_limits::max)()); // NOLINT(misc-redundant-expression) + JSON_ASSERT(x < 0); return static_cast(-(x + 1)) + 1; } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 0183fe854..cfb970d47 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -25426,7 +25426,7 @@ class serializer } // use a pointer to fill the buffer - auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) + auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto) number_unsigned_t abs_value; @@ -25600,7 +25600,7 @@ class serializer */ number_unsigned_t remove_sign(number_integer_t x) noexcept { - JSON_ASSERT(x < 0 && x < (std::numeric_limits::max)()); // NOLINT(misc-redundant-expression) + JSON_ASSERT(x < 0); return static_cast(-(x + 1)) + 1; }