🚨 fixed a warning

This commit is contained in:
Niels Lohmann 2019-03-19 23:10:21 +01:00
parent a6f9b4e36d
commit 002addabd8
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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