File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ void DiscordHttpCallback(HTTPRequestHandle request, json response)
4040
4141void CDiscordBotManager::PostDiscordMessage (const char * sDiscordBotName , const char * sMessage )
4242{
43- FOR_EACH_VEC ( m_vecDiscordBots, i )
43+ for ( int i = 0 ; i < m_vecDiscordBots. size (); i++ )
4444 {
4545 CDiscordBot bot = m_vecDiscordBots[i];
4646
@@ -74,7 +74,7 @@ void CDiscordBot::PostMessage(const char* sMessage)
7474
7575bool CDiscordBotManager::LoadDiscordBotsConfig ()
7676{
77- m_vecDiscordBots.Purge ();
77+ m_vecDiscordBots.clear ();
7878 KeyValues* pKV = new KeyValues (" discordbots" );
7979 KeyValues::AutoDelete autoDelete (pKV);
8080
@@ -105,7 +105,7 @@ bool CDiscordBotManager::LoadDiscordBotsConfig()
105105 ConMsg (" Loaded DiscordBot config %s\n " , bot.GetName ());
106106 ConMsg (" - Webhook URL: %s\n " , bot.GetWebhookUrl ());
107107 ConMsg (" - Avatar URL: %s\n " , bot.GetAvatarUrl ());
108- m_vecDiscordBots.AddToTail (bot);
108+ m_vecDiscordBots.push_back (bot);
109109 }
110110
111111 return true ;
Original file line number Diff line number Diff line change 1818 */
1919
2020#include " httpmanager.h"
21- #include " utlvector.h"
2221
2322class CDiscordBot
2423{
@@ -55,7 +54,7 @@ class CDiscordBotManager
5554 bool LoadDiscordBotsConfig ();
5655
5756private:
58- CUtlVector <CDiscordBot> m_vecDiscordBots;
57+ std::vector <CDiscordBot> m_vecDiscordBots;
5958};
6059
6160extern CDiscordBotManager* g_pDiscordBotManager;
You can’t perform that action at this time.
0 commit comments