From dfa1ed622612b22962f5d69638f72f9e9a4b7d65 Mon Sep 17 00:00:00 2001 From: Tater Date: Wed, 20 Nov 2024 23:29:38 -0600 Subject: [PATCH] fix weird msvc iterator (why does this exist)? --- src/game/client/components/bindwheel.cpp | 4 ++-- src/game/client/components/menus_settings.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/bindwheel.cpp b/src/game/client/components/bindwheel.cpp index 5b3646cbfaf..1baf530707a 100644 --- a/src/game/client/components/bindwheel.cpp +++ b/src/game/client/components/bindwheel.cpp @@ -57,7 +57,7 @@ void CBindWheel::AddBind(const char *pName, const char *pCommand) if(pName[0] == 0 && pCommand[0] == 0 || m_vBinds.size() > MAX_BINDS) return; - for each(SBind Bind in m_vBinds) + for(SBind &Bind : m_vBinds) { if(!str_comp(Bind.m_aName, pName) && !str_comp(Bind.m_aCommand, pCommand)) return; @@ -197,7 +197,7 @@ void CBindWheel::ConfigSaveCallback(IConfigManager *pConfigManager, void *pUserD CBindWheel *pSelf = (CBindWheel *)pUserData; char aBuf[128] = {}; - for each(SBind Bind in pSelf->m_vBinds) + for(SBind &Bind : pSelf->m_vBinds) { str_format(aBuf, sizeof(aBuf), "add_bindwheel \"%s\" \"%s\"", Bind.m_aName, Bind.m_aCommand); pConfigManager->WriteLine(aBuf); diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index b0be85758c2..6848308f05e 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -3288,7 +3288,7 @@ void CMenus::RenderSettingsTClient(CUIRect MainView) MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews); //RightView.VSplitRight(10.0f, &RightView, nullptr); - for(CUIRect Section in s_SectionBoxes) + for(CUIRect &Section : s_SectionBoxes) { Section.w += MarginSmall * 2.0f; Section.h += MarginSmall;