🔨 clean up

This commit is contained in:
Niels Lohmann 2019-03-18 13:53:48 +01:00
parent 9fc093c9e0
commit 8d3f4f21bc
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
11 changed files with 432 additions and 512 deletions

View file

@ -88,8 +88,8 @@
// manual branch prediction
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
#define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
#define JSON_LIKELY(x) __builtin_expect(static_cast<bool>(x), 1)
#define JSON_UNLIKELY(x) __builtin_expect(static_cast<bool>(x), 0)
#else
#define JSON_LIKELY(x) x
#define JSON_UNLIKELY(x) x