aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorStrangerke2019-09-06 00:44:54 +0200
committerStrangerke2019-09-06 00:44:54 +0200
commita9be9c1453c5106fca7598bd0d7ca1e685a59539 (patch)
treee3914aa0e5a4f12cdb10795dbddeae043098373e /engines/hdb
parent27e852e17a4fe2a3e7bb66f661e651be86c6cf3b (diff)
downloadscummvm-rg350-a9be9c1453c5106fca7598bd0d7ca1e685a59539.tar.gz
scummvm-rg350-a9be9c1453c5106fca7598bd0d7ca1e685a59539.tar.bz2
scummvm-rg350-a9be9c1453c5106fca7598bd0d7ca1e685a59539.zip
HDB: Small loop changes in sound
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/sound.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index b8f3793a1d..057d97ddc6 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -1980,12 +1980,9 @@ const char *Sound::getSNDLuaName(int index) {
}
int Sound::getSNDIndex(const char *name) {
- int i = 0;
-
- while (soundList[i].idx != LAST_SOUND) {
+ for (int i = 0; soundList[i].idx != LAST_SOUND; ++i) {
if (!scumm_stricmp(soundList[i].luaName, name))
return i;
- i++;
}
return 0;
@@ -2002,8 +1999,7 @@ SoundType Sound::whatSongIsPlaying() {
}
void Sound::markSoundCacheFreeable() {
- int i;
- for (i = 0; i < kMaxSounds; i++) {
+ for (int i = 0; i < kMaxSounds; i++) {
if (_soundCache[i].loaded == SNDMEM_LOADED)
_soundCache[i].loaded = SNDMEM_FREEABLE;
}