aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-07 22:20:08 -0800
committerChris Robinson <[email protected]>2018-01-07 22:20:08 -0800
commitd547f52d8f4d584e9f6c3b56b8dd59f27e3dfe08 (patch)
tree4780f360faf2353240328990a8ad9a73e7f3f427 /OpenAL32
parent56e9cb69d3aba60016701c6478b3f08c08aa3171 (diff)
Move the UNEXPECTED macro to the main header and rename it
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h8
1 files changed, 8 insertions, 0 deletions
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;