Avoid a macro call and mark unlikely paths as unlikely
This commit is contained in:
parent
2e010d29cb
commit
ac48569c69
@ -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()};
|
||||
|
Loading…
x
Reference in New Issue
Block a user