From 78876abd46fd68280abf855f31d2bb7e7f1589f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 30 Oct 2022 13:05:44 +0100 Subject: [PATCH] Remove unused members `CColumn::m_Flags` --- src/game/client/components/menus_browser.cpp | 25 ++++++++------------ src/game/client/components/menus_demo.cpp | 9 ++++--- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index b687d1363..7282cc7de 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -69,16 +69,12 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) CLocConstString m_Caption; int m_Direction; float m_Width; - int m_Flags; CUIRect m_Rect; CUIRect m_Spacer; }; enum { - FIXED = 1, - SPACER = 2, - COL_FLAG_LOCK = 0, COL_FLAG_FAV, COL_FLAG_OFFICIAL, @@ -91,16 +87,16 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) }; CColumn s_aCols[] = { - {-1, -1, " ", -1, 2.0f, 0, {0}, {0}}, - {COL_FLAG_LOCK, -1, " ", -1, 14.0f, 0, {0}, {0}}, - {COL_FLAG_FAV, -1, " ", -1, 14.0f, 0, {0}, {0}}, - {COL_FLAG_OFFICIAL, -1, " ", -1, 14.0f, 0, {0}, {0}}, - {COL_NAME, IServerBrowser::SORT_NAME, "Name", 0, 50.0f, 0, {0}, {0}}, // Localize - these strings are localized within CLocConstString - {COL_GAMETYPE, IServerBrowser::SORT_GAMETYPE, "Type", 1, 50.0f, 0, {0}, {0}}, - {COL_MAP, IServerBrowser::SORT_MAP, "Map", 1, 120.0f + (Headers.w - 480) / 8, 0, {0}, {0}}, - {COL_PLAYERS, IServerBrowser::SORT_NUMPLAYERS, "Players", 1, 85.0f, 0, {0}, {0}}, - {-1, -1, " ", 1, 10.0f, 0, {0}, {0}}, - {COL_PING, IServerBrowser::SORT_PING, "Ping", 1, 40.0f, FIXED, {0}, {0}}, + {-1, -1, " ", -1, 2.0f, {0}, {0}}, + {COL_FLAG_LOCK, -1, " ", -1, 14.0f, {0}, {0}}, + {COL_FLAG_FAV, -1, " ", -1, 14.0f, {0}, {0}}, + {COL_FLAG_OFFICIAL, -1, " ", -1, 14.0f, {0}, {0}}, + {COL_NAME, IServerBrowser::SORT_NAME, "Name", 0, 50.0f, {0}, {0}}, // Localize - these strings are localized within CLocConstString + {COL_GAMETYPE, IServerBrowser::SORT_GAMETYPE, "Type", 1, 50.0f, {0}, {0}}, + {COL_MAP, IServerBrowser::SORT_MAP, "Map", 1, 120.0f + (Headers.w - 480) / 8, {0}, {0}}, + {COL_PLAYERS, IServerBrowser::SORT_NUMPLAYERS, "Players", 1, 85.0f, {0}, {0}}, + {-1, -1, " ", 1, 10.0f, {0}, {0}}, + {COL_PING, IServerBrowser::SORT_PING, "Ping", 1, 40.0f, {0}, {0}}, }; // This is just for scripts/update_localization.py to work correctly (all other strings are already Localize()'d somewhere else). Don't remove! // Localize("Type"); @@ -116,7 +112,6 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) if(i + 1 < NumCols) { - //Cols[i].flags |= SPACER; Headers.VSplitLeft(2, &s_aCols[i].m_Spacer, &Headers); } } diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 43fb9299c..1dc454b23 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -1081,7 +1081,6 @@ void CMenus::RenderDemoList(CUIRect MainView) CLocConstString m_Caption; int m_Direction; float m_Width; - int m_Flags; CUIRect m_Rect; CUIRect m_Spacer; }; @@ -1095,10 +1094,10 @@ void CMenus::RenderDemoList(CUIRect MainView) }; static CColumn s_aCols[] = { - {COL_DEMONAME, SORT_DEMONAME, "Demo", 0, 0.0f, 0, {0}, {0}}, - {COL_MARKERS, SORT_MARKERS, "Markers", 1, 75.0f, 0, {0}, {0}}, - {COL_LENGTH, SORT_LENGTH, "Length", 1, 75.0f, 0, {0}, {0}}, - {COL_DATE, SORT_DATE, "Date", 1, 160.0f, 1, {0}, {0}}, + {COL_DEMONAME, SORT_DEMONAME, "Demo", 0, 0.0f, {0}, {0}}, + {COL_MARKERS, SORT_MARKERS, "Markers", 1, 75.0f, {0}, {0}}, + {COL_LENGTH, SORT_LENGTH, "Length", 1, 75.0f, {0}, {0}}, + {COL_DATE, SORT_DATE, "Date", 1, 160.0f, {0}, {0}}, }; /* This is just for scripts/update_localization.py to work correctly. Don't remove! Localize("Demo");Localize("Markers");Localize("Length");Localize("Date");