From 38537a35ccc2ad713a31943bb699d013b004d075 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 25 Dec 2018 22:32:30 -0800 Subject: Avoid using a local for a temporary --- Alc/alu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc') 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; -- cgit v1.2.3