From 2558da714e5cd2e225f2eb84c0ffeadd23d9a913 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Mar 2020 20:50:42 -0400 Subject: [PATCH] Runtime: Remove unnecessary smart pointer .get() calls Same behavior, less code to read. --- Runtime/World/CExplosion.cpp | 2 +- Runtime/World/CScriptSpecialFunction.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/World/CExplosion.cpp b/Runtime/World/CExplosion.cpp index 075a3b18a..06d3ce62b 100644 --- a/Runtime/World/CExplosion.cpp +++ b/Runtime/World/CExplosion.cpp @@ -95,7 +95,7 @@ void CExplosion::AddToRenderer(const zeus::CFrustum& frustum, const CStateManage if (!(xf4_24_renderThermalHot && mgr.GetThermalDrawFlag() == EThermalDrawFlag::Hot) && !(xf4_26_renderXray && mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::XRay)) { - g_Renderer->AddParticleGen(*xe8_particleGen.get()); + g_Renderer->AddParticleGen(*xe8_particleGen); return; } diff --git a/Runtime/World/CScriptSpecialFunction.cpp b/Runtime/World/CScriptSpecialFunction.cpp index 84d4aae21..3739d03c2 100644 --- a/Runtime/World/CScriptSpecialFunction.cpp +++ b/Runtime/World/CScriptSpecialFunction.cpp @@ -191,7 +191,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId } case ESpecialFunction::MissileStation: { if (msg == EScriptObjectMessage::Action) { - CPlayerState& pState = *mgr.GetPlayerState().get(); + CPlayerState& pState = *mgr.GetPlayerState(); pState.ResetAndIncrPickUp(CPlayerState::EItemType::Missiles, pState.GetItemCapacity(CPlayerState::EItemType::Missiles)); } @@ -199,7 +199,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId } case ESpecialFunction::PowerBombStation: { if (msg == EScriptObjectMessage::Action) { - CPlayerState& pState = *mgr.GetPlayerState().get(); + CPlayerState& pState = *mgr.GetPlayerState(); pState.ResetAndIncrPickUp(CPlayerState::EItemType::PowerBombs, pState.GetItemCapacity(CPlayerState::EItemType::PowerBombs)); }