diff options
author | Chris Robinson <[email protected]> | 2023-05-14 19:39:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-14 19:39:25 -0700 |
commit | 5d89ea32c2bb6d5a137cb345bec616b0d6708789 (patch) | |
tree | 6e914a89d45d2cacce34c265e03d9ab3b02024ef /al/listener.cpp | |
parent | 5ab9ce58808a6c92bbb92c8f58d7694cb86e5414 (diff) |
Don't check for a null context in direct functions
Diffstat (limited to 'al/listener.cpp')
-rw-r--r-- | al/listener.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/al/listener.cpp b/al/listener.cpp index 4ee4f8d7..25cb162e 100644 --- a/al/listener.cpp +++ b/al/listener.cpp @@ -71,9 +71,6 @@ inline void CommitAndUpdateProps(ALCcontext *context) FORCE_ALIGN void AL_APIENTRY alListenerfDirect(ALCcontext *context, ALenum param, ALfloat value) noexcept { - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; switch(param) @@ -100,9 +97,6 @@ FORCE_ALIGN void AL_APIENTRY alListenerfDirect(ALCcontext *context, ALenum param FORCE_ALIGN void AL_APIENTRY alListener3fDirect(ALCcontext *context, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) noexcept { - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; switch(param) @@ -149,9 +143,6 @@ FORCE_ALIGN void AL_APIENTRY alListenerfvDirect(ALCcontext *context, ALenum para } } - if(!context) UNLIKELY - return; - if(!values) UNLIKELY return context->setError(AL_INVALID_VALUE, "NULL pointer"); @@ -181,9 +172,6 @@ FORCE_ALIGN void AL_APIENTRY alListenerfvDirect(ALCcontext *context, ALenum para FORCE_ALIGN void AL_APIENTRY alListeneriDirect(ALCcontext *context, ALenum param, ALint /*value*/) noexcept { - if(!context) UNLIKELY - return; - std::lock_guard<std::mutex> _{context->mPropLock}; switch(param) { @@ -204,9 +192,6 @@ FORCE_ALIGN void AL_APIENTRY alListener3iDirect(ALCcontext *context, ALenum para return; } - if(!context) UNLIKELY - return; - std::lock_guard<std::mutex> _{context->mPropLock}; switch(param) { @@ -241,9 +226,6 @@ FORCE_ALIGN void AL_APIENTRY alListenerivDirect(ALCcontext *context, ALenum para } } - if(!context) UNLIKELY - return; - std::lock_guard<std::mutex> _{context->mPropLock}; if(!values) UNLIKELY context->setError(AL_INVALID_VALUE, "NULL pointer"); @@ -258,9 +240,6 @@ FORCE_ALIGN void AL_APIENTRY alListenerivDirect(ALCcontext *context, ALenum para FORCE_ALIGN void AL_APIENTRY alGetListenerfDirect(ALCcontext *context, ALenum param, ALfloat *value) noexcept { - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; if(!value) @@ -283,9 +262,6 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerfDirect(ALCcontext *context, ALenum pa FORCE_ALIGN void AL_APIENTRY alGetListener3fDirect(ALCcontext *context, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) noexcept { - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; if(!value1 || !value2 || !value3) @@ -325,9 +301,6 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerfvDirect(ALCcontext *context, ALenum p return; } - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; if(!values) @@ -352,9 +325,6 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerfvDirect(ALCcontext *context, ALenum p FORCE_ALIGN void AL_APIENTRY alGetListeneriDirect(ALCcontext *context, ALenum param, ALint *value) noexcept { - if(!context) UNLIKELY - return; - std::lock_guard<std::mutex> _{context->mPropLock}; if(!value) context->setError(AL_INVALID_VALUE, "NULL pointer"); @@ -368,9 +338,6 @@ FORCE_ALIGN void AL_APIENTRY alGetListeneriDirect(ALCcontext *context, ALenum pa FORCE_ALIGN void AL_APIENTRY alGetListener3iDirect(ALCcontext *context, ALenum param, ALint *value1, ALint *value2, ALint *value3) noexcept { - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; if(!value1 || !value2 || !value3) @@ -405,9 +372,6 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerivDirect(ALCcontext *context, ALenum p return; } - if(!context) UNLIKELY - return; - ALlistener &listener = context->mListener; std::lock_guard<std::mutex> _{context->mPropLock}; if(!values) |