mirror of
https://github.com/nlohmann/json.git
synced 2026-10-17 19:48:12 +00:00
🚨 fixed a warning
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -88,8 +88,8 @@
|
|||||||
|
|
||||||
// manual branch prediction
|
// manual branch prediction
|
||||||
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
||||||
#define JSON_LIKELY(x) __builtin_expect(static_cast<bool>(x), 1)
|
#define JSON_LIKELY(x) __builtin_expect(x, 1)
|
||||||
#define JSON_UNLIKELY(x) __builtin_expect(static_cast<bool>(x), 0)
|
#define JSON_UNLIKELY(x) __builtin_expect(x, 0)
|
||||||
#else
|
#else
|
||||||
#define JSON_LIKELY(x) x
|
#define JSON_LIKELY(x) x
|
||||||
#define JSON_UNLIKELY(x) x
|
#define JSON_UNLIKELY(x) x
|
||||||
|
|||||||
@@ -539,8 +539,8 @@ class other_error : public exception
|
|||||||
|
|
||||||
// manual branch prediction
|
// manual branch prediction
|
||||||
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
||||||
#define JSON_LIKELY(x) __builtin_expect(static_cast<bool>(x), 1)
|
#define JSON_LIKELY(x) __builtin_expect(x, 1)
|
||||||
#define JSON_UNLIKELY(x) __builtin_expect(static_cast<bool>(x), 0)
|
#define JSON_UNLIKELY(x) __builtin_expect(x, 0)
|
||||||
#else
|
#else
|
||||||
#define JSON_LIKELY(x) x
|
#define JSON_LIKELY(x) x
|
||||||
#define JSON_UNLIKELY(x) x
|
#define JSON_UNLIKELY(x) x
|
||||||
|
|||||||
Reference in new issue
Block a user