Strip sourcehook containers (#2578)

This commit is contained in:
Benoist
2026-09-17 20:56:47 -04:00
committed by GitHub
parent 3723860af3
commit 82cd96aef6
94 changed files with 512 additions and 671 deletions
+4 -7
View File
@@ -43,8 +43,7 @@ RootConsoleMenu::RootConsoleMenu()
RootConsoleMenu::~RootConsoleMenu()
{
List<ConsoleEntry *>::iterator iter;
for (iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
for (auto iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
{
delete (*iter);
}
@@ -101,7 +100,7 @@ bool RootConsoleMenu::AddRootConsoleCommand3(const char *cmd,
return false;
/* Sort this into the menu */
List<ConsoleEntry *>::iterator iter = m_Menu.begin();
auto iter = m_Menu.begin();
ConsoleEntry *pEntry;
bool inserted = false;
while (iter != m_Menu.end())
@@ -138,9 +137,8 @@ bool RootConsoleMenu::RemoveRootConsoleCommand(const char *cmd, IRootConsoleComm
{
m_Commands.remove(cmd);
List<ConsoleEntry *>::iterator iter;
ConsoleEntry *pEntry;
for (iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
for (auto iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
{
pEntry = (*iter);
if (pEntry->command.compare(cmd) == 0)
@@ -201,9 +199,8 @@ void RootConsoleMenu::GotRootCmd(const ICommandArgs *cmd)
ConsolePrint("SourceMod Menu:");
ConsolePrint("Usage: sm <command> [arguments]");
List<ConsoleEntry *>::iterator iter;
ConsoleEntry *pEntry;
for (iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
for (auto iter=m_Menu.begin(); iter!=m_Menu.end(); iter++)
{
pEntry = (*iter);
DrawGenericOption(pEntry->command.c_str(), pEntry->description.c_str());