From d547f52d8f4d584e9f6c3b56b8dd59f27e3dfe08 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 7 Jan 2018 22:20:08 -0800 Subject: Move the UNEXPECTED macro to the main header and rename it --- OpenAL32/Include/alMain.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index fe282c88..37baabed 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -203,6 +203,14 @@ AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format); #endif +#ifdef __GNUC__ +#define LIKELY(x) __builtin_expect(!!(x), !0) +#define UNLIKELY(x) __builtin_expect(!!(x), 0) +#else +#define LIKELY(x) (!!(x)) +#define UNLIKELY(x) (!!(x)) +#endif + typedef ALint64SOFT ALint64; typedef ALuint64SOFT ALuint64; -- cgit v1.2.3