From 50f8f3e17e975773b5ec132ef11878344780cd02 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 5 Mar 2020 20:47:05 -0500 Subject: [PATCH] CInGameGuiManager: Take std::shared_ptr by const reference in DoStateTransition() Trivially avoids an atomic reference count increment and decrement. --- Runtime/MP1/CInGameGuiManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/MP1/CInGameGuiManager.cpp b/Runtime/MP1/CInGameGuiManager.cpp index 561c98e72..30187a12f 100644 --- a/Runtime/MP1/CInGameGuiManager.cpp +++ b/Runtime/MP1/CInGameGuiManager.cpp @@ -103,8 +103,8 @@ void CInGameGuiManager::DoStateTransition(CStateManager& stateMgr) { case EInGameGuiState::PauseGame: case EInGameGuiState::PauseLogBook: if (!x48_pauseScreen) { - auto pState = stateMgr.GetPlayerState(); - CPlayerState::EPlayerSuit suit = pState->GetCurrentSuitRaw(); + const auto& pState = stateMgr.GetPlayerState(); + const CPlayerState::EPlayerSuit suit = pState->GetCurrentSuitRaw(); int suitResIdx; if (pState->IsFusionEnabled()) { switch (suit) {