diff options
author | Chris Robinson <[email protected]> | 2019-09-12 11:59:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-12 11:59:36 -0700 |
commit | ac48569c691f92311be81271e9b6b57947eb35a0 (patch) | |
tree | 6ce18e7e706bfb75390b7bae337a86d5bb9bc9b4 /al | |
parent | 2e010d29cba51aec339179d52d3faddf84faafb0 (diff) |
Avoid a macro call and mark unlikely paths as unlikely
Diffstat (limited to 'al')
-rw-r--r-- | al/auxeffectslot.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index f2801329..85c07c89 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -253,9 +253,9 @@ START_API_FUNC ContextRef context{GetContextRef()}; if UNLIKELY(!context) return; - if(n < 0) - SETERR_RETURN(context, AL_INVALID_VALUE,, "Generating %d effect slots", n); - if(n == 0) return; + if UNLIKELY(n < 0) + context->setError(AL_INVALID_VALUE, "Generating %d effect slots", n); + if UNLIKELY(n <= 0) return; std::unique_lock<std::mutex> slotlock{context->mEffectSlotLock}; ALCdevice *device{context->mDevice.get()}; |