aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
committerChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
commitcfb6bdfabfdf70ce5bcb650d356c3a9c1db3df0c (patch)
tree6776ebcdd9b5bac5812e97d580290e5ebd2676a7 /al/source.cpp
parent4720b2c64d91facea24e8411c104770bd3763afa (diff)
Avoid assignments in if conditions
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index c99943cf..f119ee36 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3410,8 +3410,8 @@ FORCE_ALIGN void AL_APIENTRY alSourceQueueBuffersDirect(ALCcontext *context, ALu
for(ALsizei i{0};i < nb;i++)
{
bool fmt_mismatch{false};
- ALbuffer *buffer{nullptr};
- if(buffers[i] && (buffer=LookupBuffer(device, buffers[i])) == nullptr)
+ ALbuffer *buffer{buffers[i] ? LookupBuffer(device, buffers[i]) : nullptr};
+ if(buffers[i] && !buffer)
{
context->setError(AL_INVALID_NAME, "Queueing invalid buffer ID %u", buffers[i]);
goto buffer_error;