diff --git a/modules/stickychan.cpp b/modules/stickychan.cpp index 2e2e146a..0a6984c9 100644 --- a/modules/stickychan.cpp +++ b/modules/stickychan.cpp @@ -135,8 +135,8 @@ public: bool bSubmitted = (WebSock.GetParam("submitted").ToInt() != 0); const vector& Channels = GetNetwork()->GetChans(); - for (unsigned int c = 0; c < Channels.size(); c++) { - const CString sChan = Channels[c]->GetName(); + for (CChan* pChan : Channels) { + const CString sChan = pChan->GetName(); bool bStick = FindNV(sChan) != EndNV(); if(bSubmitted) { @@ -198,12 +198,11 @@ static void RunTimer(CModule * pModule, CFPTimer *pTimer) bool CStickyChan::OnLoad(const CString& sArgs, CString& sMessage) { VCString vsChans; - VCString::iterator it; sArgs.Split(",", vsChans, false); - for (it = vsChans.begin(); it != vsChans.end(); ++it) { - CString sChan = it->Token(0); - CString sKey = it->Token(1, true); + for (const CString& s : vsChans) { + CString sChan = s.Token(0); + CString sKey = s.Token(1, true); SetNV(sChan, sKey); }