aboutsummaryrefslogtreecommitdiffstats
path: root/al/listener.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-05 15:17:39 -0800
committerChris Robinson <[email protected]>2022-12-05 15:17:39 -0800
commit4de5c7dfeebc2335ad3d7c2dd4905284677a68c9 (patch)
tree849a6f5dd7b284e1766671cc13769d257f20ea03 /al/listener.cpp
parentdf6d61dd40b602af55f903564358b083bb8b37e4 (diff)
Avoid some uses of the LIKELY/UNLIKELY macros
Diffstat (limited to 'al/listener.cpp')
-rw-r--r--al/listener.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/al/listener.cpp b/al/listener.cpp
index 9484d9b1..a71e2999 100644
--- a/al/listener.cpp
+++ b/al/listener.cpp
@@ -81,7 +81,7 @@ AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value)
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -111,7 +111,7 @@ AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -161,7 +161,7 @@ START_API_FUNC
}
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -193,7 +193,7 @@ AL_API void AL_APIENTRY alListeneri(ALenum param, ALint /*value*/)
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
std::lock_guard<std::mutex> _{context->mPropLock};
switch(param)
@@ -216,7 +216,7 @@ START_API_FUNC
}
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
std::lock_guard<std::mutex> _{context->mPropLock};
switch(param)
@@ -253,7 +253,7 @@ START_API_FUNC
}
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
std::lock_guard<std::mutex> _{context->mPropLock};
if(!values)
@@ -271,7 +271,7 @@ AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value)
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -297,7 +297,7 @@ AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -340,7 +340,7 @@ START_API_FUNC
}
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -369,7 +369,7 @@ AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value)
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
std::lock_guard<std::mutex> _{context->mPropLock};
if(!value)
@@ -386,7 +386,7 @@ AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *valu
START_API_FUNC
{
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};
@@ -424,7 +424,7 @@ START_API_FUNC
}
ContextRef context{GetContextRef()};
- if UNLIKELY(!context) return;
+ if(!context) [[alunlikely]] return;
ALlistener &listener = context->mListener;
std::lock_guard<std::mutex> _{context->mPropLock};