diff --git a/src/common.h b/src/common.h index ae0cfe8a9..0ba47f3bc 100644 --- a/src/common.h +++ b/src/common.h @@ -310,8 +310,8 @@ void wcs2string_appending(const wchar_t *in, size_t len, std::string *receiver); bool should_suppress_stderr_for_tests(); /// Branch prediction hints. Idea borrowed from Linux kernel. Just used for asserts. -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) +#define likely(x) __builtin_expect(bool(x), 1) +#define unlikely(x) __builtin_expect(bool(x), 0) void assert_is_main_thread(const char *who); #define ASSERT_IS_MAIN_THREAD_TRAMPOLINE(x) assert_is_main_thread(x)