Fix RAPIDJSON_(UN)LIKELY for VC

This commit is contained in:
Milo Yip 2016-03-01 10:16:36 +08:00
parent ef5e74a200
commit 6c927047c4

View File

@ -452,7 +452,7 @@ RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__) || defined(__clang__)
#define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1)
#else
#define RAPIDJSON_LIKELY(x) x
#define RAPIDJSON_LIKELY(x) (x)
#endif
#endif
@ -465,7 +465,7 @@ RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__) || defined(__clang__)
#define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
#define RAPIDJSON_UNLIKELY(x) x
#define RAPIDJSON_UNLIKELY(x) (x)
#endif
#endif