From 9e19acd9e1bf4627d99a0ef87757da4c227ef2db Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 25 Dec 2018 10:06:17 -0800 Subject: Avoid making static local copies of constexpr values --- Alc/alu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Alc/alu.cpp') diff --git a/Alc/alu.cpp b/Alc/alu.cpp index abe938f1..cad1a9e6 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -642,14 +642,14 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev Elev, Spread, coeffs); /* NOTE: W needs to be scaled due to FuMa normalization. */ - ComputePanGains(&Device->FOAOut, coeffs, DryGain*AmbiScale::FromFuMa[0], + const ALfloat &scale0 = AmbiScale::FromFuMa[0]; + ComputePanGains(&Device->FOAOut, coeffs, DryGain*scale0, voice->Direct.Params[0].Gains.Target); for(ALsizei i{0};i < NumSends;i++) { if(const ALeffectslot *Slot{SendSlots[i]}) ComputePanningGainsBF(Slot->ChanMap, Slot->NumChannels, coeffs, - WetGain[i]*AmbiScale::FromFuMa[0], voice->Send[i].Params[0].Gains.Target - ); + WetGain[i]*scale0, voice->Send[i].Params[0].Gains.Target); } } else @@ -692,10 +692,10 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev * matrix is transposed, for the inputs to align on the rows and * outputs on the columns. */ - static const ALfloat scale0{AmbiScale::FromFuMa[0]}; - static const ALfloat scale1{AmbiScale::FromFuMa[1]}; - static const ALfloat scale2{AmbiScale::FromFuMa[2]}; - static const ALfloat scale3{AmbiScale::FromFuMa[3]}; + const ALfloat &scale0 = AmbiScale::FromFuMa[0]; + const ALfloat &scale1 = AmbiScale::FromFuMa[1]; + const ALfloat &scale2 = AmbiScale::FromFuMa[2]; + const ALfloat &scale3 = AmbiScale::FromFuMa[3]; const alu::Matrix matrix{ // ACN0 ACN1 ACN2 ACN3 scale0, 0.0f, 0.0f, 0.0f, // Ambi W -- cgit v1.2.3