From 4d94757e1513579964c7baf279adb100f9312fdc Mon Sep 17 00:00:00 2001 From: zakalibit <2941615+zakalibit@users.noreply.github.com> Date: Sat, 1 Sep 2018 11:14:31 +0100 Subject: [PATCH] Fix compiler warning. It works with signed and unsigned integers. --- include/nlohmann/detail/output/serializer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index de3676ac59..4c4e662f1f 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -442,7 +442,7 @@ class serializer return; } - const bool is_negative = (x <= 0) and (x != 0); // see issue #755 + const bool is_negative = !(x>=0); // see issue #755 std::size_t i = 0; while (x != 0)