aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-25 21:04:52 -0800
committerChris Robinson <[email protected]>2023-12-25 21:04:52 -0800
commit095d1964feacaa4ec253db028fb1e8c04f718511 (patch)
treeb8f95aa4025d347389d1410509c62974d8647365
parentec914e895ff6d7bf2d19e8c8785e5d8bfd38629f (diff)
Avoid another assignment in an if statement
-rw-r--r--al/source.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/al/source.cpp b/al/source.cpp
index f119ee36..a440a04b 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -1923,7 +1923,8 @@ NOINLINE void SetProperty(ALsource *const Source, ALCcontext *const Context, con
ALeffectslot *slot{};
if(values[0])
{
- if((slot=LookupEffectSlot(Context, slotid)) == nullptr) UNLIKELY
+ slot = LookupEffectSlot(Context, slotid);
+ if(!slot) UNLIKELY
return Context->setError(AL_INVALID_VALUE, "Invalid effect ID %s",
std::to_string(slotid).c_str());
}