From 35ca90178440a3b040ed0e3b810ee17bd6e75405 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 9 Apr 2020 21:23:47 -0400 Subject: [PATCH] CHudRadarInterface: Remove mutable specifiers from class members We can just drop the const qualifiers on the relevant member functions to make these unnecessary. --- Runtime/GuiSys/CHudRadarInterface.cpp | 7 +++---- Runtime/GuiSys/CHudRadarInterface.hpp | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Runtime/GuiSys/CHudRadarInterface.cpp b/Runtime/GuiSys/CHudRadarInterface.cpp index aea967b02..f5ffa5292 100644 --- a/Runtime/GuiSys/CHudRadarInterface.cpp +++ b/Runtime/GuiSys/CHudRadarInterface.cpp @@ -28,8 +28,7 @@ CHudRadarInterface::CHudRadarInterface(CGuiFrame& baseHud, CStateManager& stateM x40_BaseWidget_RadarStuff->SetColor(g_tweakGuiColors->GetRadarStuffColor()); } -void CHudRadarInterface::DoDrawRadarPaint(const zeus::CVector3f& translate, float radius, - const zeus::CColor& color) const { +void CHudRadarInterface::DoDrawRadarPaint(const zeus::CVector3f& translate, float radius, const zeus::CColor& color) { radius *= 4.f; CRadarPaintShader::Instance& inst = m_paintInsts.emplace_back(); @@ -45,7 +44,7 @@ void CHudRadarInterface::DoDrawRadarPaint(const zeus::CVector3f& translate, floa } void CHudRadarInterface::DrawRadarPaint(const zeus::CVector3f& enemyPos, float radius, float alpha, - const SRadarPaintDrawParms& parms) const { + const SRadarPaintDrawParms& parms) { zeus::CVector2f playerToEnemy = enemyPos.toVec2f() - parms.x0_playerPos.toVec2f(); float zDelta = std::fabs(enemyPos.z() - parms.x0_playerPos.z()); @@ -81,7 +80,7 @@ void CHudRadarInterface::Update(float dt, const CStateManager& mgr) { } } -void CHudRadarInterface::Draw(const CStateManager& mgr, float alpha) const { +void CHudRadarInterface::Draw(const CStateManager& mgr, float alpha) { alpha *= g_GameState->GameOptions().GetHUDAlpha() / 255.f; if (g_tweakGui->GetHudVisMode() == ITweakGui::EHudVisMode::Zero || !x3c_24_visibleGame || !x0_txtrRadarPaint || !x0_txtrRadarPaint.IsLoaded()) diff --git a/Runtime/GuiSys/CHudRadarInterface.hpp b/Runtime/GuiSys/CHudRadarInterface.hpp index 8a601701b..080b496fe 100644 --- a/Runtime/GuiSys/CHudRadarInterface.hpp +++ b/Runtime/GuiSys/CHudRadarInterface.hpp @@ -33,17 +33,16 @@ class CHudRadarInterface { bool x3c_25_visibleDebug : 1; CGuiWidget* x40_BaseWidget_RadarStuff; CGuiCamera* x44_camera; - mutable CRadarPaintShader m_paintShader; - mutable std::vector m_paintInsts; - void DoDrawRadarPaint(const zeus::CVector3f& translate, float radius, const zeus::CColor& color) const; - void DrawRadarPaint(const zeus::CVector3f& enemyPos, float radius, float alpha, - const SRadarPaintDrawParms& parms) const; + CRadarPaintShader m_paintShader; + std::vector m_paintInsts; + void DoDrawRadarPaint(const zeus::CVector3f& translate, float radius, const zeus::CColor& color); + void DrawRadarPaint(const zeus::CVector3f& enemyPos, float radius, float alpha, const SRadarPaintDrawParms& parms); public: CHudRadarInterface(CGuiFrame& baseHud, CStateManager& stateMgr); void SetIsVisibleGame(bool v); void Update(float dt, const CStateManager& mgr); - void Draw(const CStateManager& mgr, float alpha) const; + void Draw(const CStateManager& mgr, float alpha); }; } // namespace urde