diff options
author | Chris Robinson <[email protected]> | 2018-12-25 22:32:30 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-25 22:32:30 -0800 |
commit | 38537a35ccc2ad713a31943bb699d013b004d075 (patch) | |
tree | a1999da267f11a95e87ef7bf8bf9451e58f9f55d | |
parent | b2665a503f024ae78f004443bd853198322daa79 (diff) |
Avoid using a local for a temporary
-rw-r--r-- | Alc/alu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 96d73d1a..fec574d8 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -348,11 +348,11 @@ bool CalcListenerParams(ALCcontext *Context) 0.0f, 0.0f, 0.0f, 1.0f }; - alu::Vector P{props->Position[0], props->Position[1], props->Position[2], 1.0f}; - P = Listener.Params.Matrix * P; + const alu::Vector P{Listener.Params.Matrix * + alu::Vector{props->Position[0], props->Position[1], props->Position[2], 1.0f}}; Listener.Params.Matrix.setRow(3, -P[0], -P[1], -P[2], 1.0f); - alu::Vector vel{props->Velocity[0], props->Velocity[1], props->Velocity[2], 0.0f}; + const alu::Vector vel{props->Velocity[0], props->Velocity[1], props->Velocity[2], 0.0f}; Listener.Params.Velocity = Listener.Params.Matrix * vel; Listener.Params.Gain = props->Gain * Context->GainBoost; |