diff options
author | Christoph Mallon | 2011-08-07 12:07:54 +0200 |
---|---|---|
committer | Christoph Mallon | 2011-08-07 15:19:08 +0200 |
commit | d1688d22d4ad9919d31e1364e9f36e795de929a4 (patch) | |
tree | 6c951595c3ac0c6463beb448810dd11bb31da528 /audio/mods | |
parent | 3ee307e6b33d31206bcc9bfc160407c9550b9adf (diff) | |
download | scummvm-rg350-d1688d22d4ad9919d31e1364e9f36e795de929a4.tar.gz scummvm-rg350-d1688d22d4ad9919d31e1364e9f36e795de929a4.tar.bz2 scummvm-rg350-d1688d22d4ad9919d31e1364e9f36e795de929a4.zip |
AUDIO: Simplify iterating backwards over an array.
Diffstat (limited to 'audio/mods')
-rw-r--r-- | audio/mods/maxtrax.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/mods/maxtrax.cpp b/audio/mods/maxtrax.cpp index 252c0e3b06..344d678b76 100644 --- a/audio/mods/maxtrax.cpp +++ b/audio/mods/maxtrax.cpp @@ -707,8 +707,8 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui if ((channel.flags & ChannelContext::kFlagMono) == 0) { voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri); } else { - VoiceContext *voice = ARRAYEND(_voiceCtx) - 1; - for (voiceNum = ARRAYSIZE(_voiceCtx) - 1; voiceNum >= 0 && voice->channel != &channel; --voiceNum, --voice) + VoiceContext *voice = ARRAYEND(_voiceCtx); + for (voiceNum = ARRAYSIZE(_voiceCtx); voiceNum-- != 0 && --voice->channel != &channel;) ; if (voiceNum < 0) voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri); |