aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-03-26 06:04:11 -0700
committerChris Robinson <[email protected]>2018-03-26 06:04:11 -0700
commit964723691ac45943b6d9b62268ec7908cf27b6a6 (patch)
treee719cb6679f2ed24e3784f56cf10c57cb43c60bf
parent2475d4652c3bd7782ce9a8016ea43dde80bf97f4 (diff)
Condense an if check
-rw-r--r--Alc/ALu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index f974de46..fef50feb 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -768,9 +768,8 @@ static void CalcPanningAndFilters(ALvoice *voice, const ALfloat Distance, const
for(c = 0;c < num_channels;c++)
{
- int idx;
- if((idx=GetChannelIdxByName(&Device->RealOut, chans[c].channel)) != -1)
- voice->Direct.Params[c].Gains.Target[idx] = DryGain;
+ int idx = GetChannelIdxByName(&Device->RealOut, chans[c].channel);
+ if(idx != -1) voice->Direct.Params[c].Gains.Target[idx] = DryGain;
}
/* Auxiliary sends still use normal channel panning since they mix to