diff options
author | Chris Robinson <[email protected]> | 2018-01-07 22:20:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-07 22:20:08 -0800 |
commit | d547f52d8f4d584e9f6c3b56b8dd59f27e3dfe08 (patch) | |
tree | 4780f360faf2353240328990a8ad9a73e7f3f427 /OpenAL32 | |
parent | 56e9cb69d3aba60016701c6478b3f08c08aa3171 (diff) |
Move the UNEXPECTED macro to the main header and rename it
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 8 |
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; |