diff options
author | Chris Robinson <[email protected]> | 2013-03-19 07:38:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-03-19 07:38:42 -0700 |
commit | 23703ff40fdcb56ff4bca76a3c60a250ae61add6 (patch) | |
tree | 8a1f3283106cbbb3f97b9bb2e18cd7744495aa66 /OpenAL32 | |
parent | fb11eb11901f4312f2d7fe922b6a39960c821483 (diff) |
Avoid an unnecessary size variable
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alEffect.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 07bbaa8e..2739ad5e 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -654,11 +654,10 @@ static const struct { DECL(SMALLWATERROOM), }; #undef DECL -static const ALsizei reverblistsize = COUNTOF(reverblist); ALvoid LoadReverbPreset(const char *name, ALeffect *effect) { - int i; + size_t i; if(strcasecmp(name, "NONE") == 0) { @@ -673,7 +672,7 @@ ALvoid LoadReverbPreset(const char *name, ALeffect *effect) InitEffectParams(effect, AL_EFFECT_REVERB); else InitEffectParams(effect, AL_EFFECT_NULL); - for(i = 0;i < reverblistsize;i++) + for(i = 0;i < COUNTOF(reverblist);i++) { const EFXEAXREVERBPROPERTIES *props; @@ -709,8 +708,8 @@ ALvoid LoadReverbPreset(const char *name, ALeffect *effect) effect->Reverb.LFReference = props->flLFReference; effect->Reverb.RoomRolloffFactor = props->flRoomRolloffFactor; effect->Reverb.DecayHFLimit = props->iDecayHFLimit; - break; + return; } - if(i == reverblistsize) - WARN("Reverb preset '%s' not found\n", name); + + WARN("Reverb preset '%s' not found\n", name); } |