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/event.cpp | |
parent | 5ab9ce58808a6c92bbb92c8f58d7694cb86e5414 (diff) |
Don't check for a null context in direct functions
Diffstat (limited to 'al/event.cpp')
-rw-r--r-- | al/event.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/al/event.cpp b/al/event.cpp index f7ef7b50..dffd76d0 100644 --- a/al/event.cpp +++ b/al/event.cpp @@ -176,9 +176,6 @@ void StopEventThrd(ALCcontext *ctx) FORCE_ALIGN void AL_APIENTRY alEventControlDirectSOFT(ALCcontext *context, ALsizei count, const ALenum *types, ALboolean enable) noexcept { - if(!context) UNLIKELY - return; - if(count < 0) context->setError(AL_INVALID_VALUE, "Controlling %d events", count); if(count <= 0) return; if(!types) return context->setError(AL_INVALID_VALUE, "NULL pointer"); @@ -230,9 +227,6 @@ FORCE_ALIGN void AL_APIENTRY alEventControlDirectSOFT(ALCcontext *context, ALsiz FORCE_ALIGN void AL_APIENTRY alEventCallbackDirectSOFT(ALCcontext *context, ALEVENTPROCSOFT callback, void *userParam) noexcept { - if(!context) UNLIKELY - return; - std::lock_guard<std::mutex> _{context->mPropLock}; std::lock_guard<std::mutex> __{context->mEventCbLock}; context->mEventCb = callback; |