From cf617760b6eb68d38493dd546746880cd5c88b90 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 30 Sep 2019 03:03:27 -0700 Subject: [PATCH] Separate a couple assignments from conditionals --- al/source.cpp | 3 ++- alc/mixvoice.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/al/source.cpp b/al/source.cpp index a802cabc..6d15f73a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3159,7 +3159,8 @@ START_API_FUNC /* Source is now streaming */ source->SourceType = AL_STREAMING; - if(!(BufferList=source->queue)) + BufferList = source->queue; + if(!BufferList) source->queue = BufferListStart; else { diff --git a/alc/mixvoice.cpp b/alc/mixvoice.cpp index c696f114..d6be174e 100644 --- a/alc/mixvoice.cpp +++ b/alc/mixvoice.cpp @@ -820,7 +820,8 @@ void ALvoice::mix(State vstate, ALCcontext *Context, const ALuint SamplesToDo) ++buffers_done; BufferListItem = BufferListItem->mNext.load(std::memory_order_relaxed); - if(!BufferListItem && !(BufferListItem=BufferLoopItem)) + if(!BufferListItem) BufferListItem = BufferLoopItem; + if(!BufferListItem) { if LIKELY(vstate == ALvoice::Playing) vstate = ALvoice::Stopped; -- 2.11.4.GIT