aboutsummaryrefslogtreecommitdiffstats
path: root/al/event.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-01 11:35:39 -0800
committerChris Robinson <[email protected]>2023-03-01 11:35:39 -0800
commitfde74453a62a1ce4b5efaac0ec1835b9f5731e25 (patch)
treeed74db646800b78ca8651bb5291453927f48cd93 /al/event.cpp
parentec9c421d312d6df701631877f6ce6256355101dc (diff)
Use macros for the likely/unlikely attributes
The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
Diffstat (limited to 'al/event.cpp')
-rw-r--r--al/event.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/al/event.cpp b/al/event.cpp
index 8b8fa686..1bc39d1e 100644
--- a/al/event.cpp
+++ b/al/event.cpp
@@ -55,7 +55,7 @@ static int EventThread(ALCcontext *context)
ring->readAdvance(1);
quitnow = evt.EnumType == AsyncEvent::KillThread;
- if(quitnow) [[unlikely]] break;
+ if(quitnow) UNLIKELY break;
if(evt.EnumType == AsyncEvent::ReleaseEffectState)
{
@@ -150,7 +150,7 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if(!context) [[unlikely]] return;
+ if(!context) UNLIKELY return;
if(count < 0) context->setError(AL_INVALID_VALUE, "Controlling %d events", count);
if(count <= 0) return;
@@ -205,7 +205,7 @@ AL_API void AL_APIENTRY alEventCallbackSOFT(ALEVENTPROCSOFT callback, void *user
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if(!context) [[unlikely]] return;
+ if(!context) UNLIKELY return;
std::lock_guard<std::mutex> _{context->mPropLock};
std::lock_guard<std::mutex> __{context->mEventCbLock};