From 13ed0e386a67181512c704c5a08f680b84be330f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 18 May 2023 12:21:34 +0200 Subject: [PATCH] Use `const` when possible --- src/game/client/components/menus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 2ce21c7f7..9c43eae3d 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -873,9 +873,9 @@ void CMenus::RenderLoading(const char *pCaption, const char *pContent, int Incre // TODO: not supported right now due to separate render thread static std::chrono::nanoseconds s_LastLoadRender{0}; - auto CurLoadRenderCount = m_LoadCurrent; + const int CurLoadRenderCount = m_LoadCurrent; m_LoadCurrent += IncreaseCounter; - float Percent = CurLoadRenderCount / (float)m_LoadTotal; + const float Percent = CurLoadRenderCount / (float)m_LoadTotal; // make sure that we don't render for each little thing we load // because that will slow down loading if we have vsync