From 095d1964feacaa4ec253db028fb1e8c04f718511 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 25 Dec 2023 21:04:52 -0800 Subject: Avoid another assignment in an if statement --- al/source.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'al') 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()); } -- cgit v1.2.3