From ef90d62ddf4713f0ca1029d6884997f2a073ca60 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 21 Nov 2018 21:17:38 +0100 Subject: [PATCH] :rotating_light: fixed warning #1364 --- include/nlohmann/detail/input/binary_reader.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 5f3efaaf1..2946611cf 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -241,7 +241,7 @@ class binary_reader case 0x08: // boolean { - return sax->boolean(static_cast(get())); + return sax->boolean(get() != 0); } case 0x0A: // null diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 7c31d212f..016ba39d7 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6582,7 +6582,7 @@ class binary_reader case 0x08: // boolean { - return sax->boolean(static_cast(get())); + return sax->boolean(get() != 0); } case 0x0A: // null