From 89e2e65100631f9fbe158b289fc26b2945bacfe4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Apr 2020 13:43:52 -0400 Subject: [PATCH] CCameraManager: Eliminate variable shadowing We can get rid of shadowing in an inner scope. --- Runtime/Camera/CCameraManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Runtime/Camera/CCameraManager.cpp b/Runtime/Camera/CCameraManager.cpp index b73158140..a2fd101e7 100644 --- a/Runtime/Camera/CCameraManager.cpp +++ b/Runtime/Camera/CCameraManager.cpp @@ -398,8 +398,7 @@ void CCameraManager::UpdateCameraHints(float, CStateManager& mgr) { } } else { if (const TCastToConstPtr act = mgr.GetObjectById(bestHint->GetFirstHelper())) { - zeus::CVector3f ballPos = mgr.GetPlayer().GetBallPosition(); - zeus::CVector3f f26 = act->GetTranslation() - ballPos; + const zeus::CVector3f f26 = act->GetTranslation() - mgr.GetPlayer().GetBallPosition(); zeus::CVector3f ballToHelper = f26; if (ballToHelper.canBeNormalized()) { ballToHelper.normalize();