From 88f594bc11aa437a42474f28154cec5feb61144a Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 23 Jul 2011 14:50:06 -0700 Subject: [PATCH] Tidy up some loops over the queue. --- Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp index bc4f1948..eb1d6ef7 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp @@ -81,7 +81,7 @@ hsError plSoundPreloader::Run() while (fRunning) { fCritSect.Lock(); - for (int i = fBuffers.GetCount(); i > 0; i--) + while (fBuffers.GetCount()) { templist.Append(fBuffers.Pop()); } @@ -94,7 +94,7 @@ hsError plSoundPreloader::Run() else { plAudioFileReader *reader = nil; - for (int i = templist.GetCount(); i > 0; i--) + while (templist.GetCount()) { plSoundBuffer* buf = templist.Pop(); @@ -122,7 +122,7 @@ hsError plSoundPreloader::Run() // we need to be sure that all buffers are removed from our load list when shutting this thread down or we will hang, // since the sound buffer will wait to be destroyed until it is marked as loaded fCritSect.Lock(); - for (int i = fBuffers.GetCount(); i > 0; i--) + while (fBuffers.GetCount()) { plSoundBuffer* buf = fBuffers.Pop(); buf->SetLoaded(true);