From 002addabd8be311dbed48cbdb3fb6e80383a4287 Mon Sep 17 00:00:00 2001
From: Niels Lohmann <mail@nlohmann.me>
Date: Tue, 19 Mar 2019 23:10:21 +0100
Subject: [PATCH] :rotating_light: fixed a warning

---
 include/nlohmann/detail/macro_scope.hpp | 4 ++--
 single_include/nlohmann/json.hpp        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp
index d8408361..ef138100 100644
--- a/include/nlohmann/detail/macro_scope.hpp
+++ b/include/nlohmann/detail/macro_scope.hpp
@@ -88,8 +88,8 @@
 
 // manual branch prediction
 #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
-    #define JSON_LIKELY(x)      __builtin_expect(static_cast<bool>(x), 1)
-    #define JSON_UNLIKELY(x)    __builtin_expect(static_cast<bool>(x), 0)
+    #define JSON_LIKELY(x)      __builtin_expect(x, 1)
+    #define JSON_UNLIKELY(x)    __builtin_expect(x, 0)
 #else
     #define JSON_LIKELY(x)      x
     #define JSON_UNLIKELY(x)    x
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 41070010..b252a0bc 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -539,8 +539,8 @@ class other_error : public exception
 
 // manual branch prediction
 #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
-    #define JSON_LIKELY(x)      __builtin_expect(static_cast<bool>(x), 1)
-    #define JSON_UNLIKELY(x)    __builtin_expect(static_cast<bool>(x), 0)
+    #define JSON_LIKELY(x)      __builtin_expect(x, 1)
+    #define JSON_UNLIKELY(x)    __builtin_expect(x, 0)
 #else
     #define JSON_LIKELY(x)      x
     #define JSON_UNLIKELY(x)    x