From: <ps...@us...> - 2010-02-19 16:21:15
|
Revision: 1776 http://znc.svn.sourceforge.net/znc/?rev=1776&view=rev Author: psychon Date: 2010-02-19 16:21:07 +0000 (Fri, 19 Feb 2010) Log Message: ----------- Fix a bunch of style suggestions from cppcheck[1] Thanks to DarthGandalf for this patch. You must be bored. :P [1] cppcheck.sf.net Modified Paths: -------------- trunk/Buffer.cpp trunk/Chan.cpp trunk/ClientCommand.cpp trunk/DCCBounce.cpp trunk/FileUtils.cpp trunk/HTTPSock.cpp trunk/IRCSock.cpp trunk/Modules.cpp trunk/Nick.cpp trunk/Socket.cpp trunk/Template.cpp trunk/User.cpp trunk/Utils.cpp trunk/ZNCString.cpp trunk/modules/admin.cpp trunk/modules/autoattach.cpp trunk/modules/autocycle.cpp trunk/modules/autoop.cpp trunk/modules/away.cpp trunk/modules/buffextras.cpp trunk/modules/chansaver.cpp trunk/modules/crypt.cpp Modified: trunk/Buffer.cpp =================================================================== --- trunk/Buffer.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Buffer.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -43,7 +43,7 @@ } int CBuffer::UpdateLine(const CString& sPre, const CString& sPost, bool bIncNick) { - for (iterator it = begin(); it != end(); it++) { + for (iterator it = begin(); it != end(); ++it) { if (it->GetPre() == sPre) { it->SetPost(sPost); it->SetIncNick(bIncNick); @@ -55,7 +55,7 @@ } int CBuffer::UpdateExactLine(const CString& sPre, const CString& sPost, bool bIncNick) { - for (iterator it = begin(); it != end(); it++) { + for (iterator it = begin(); it != end(); ++it) { if (it->GetPre() == sPre && it->GetPost() == sPost) return size(); } Modified: trunk/Chan.cpp =================================================================== --- trunk/Chan.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Chan.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -111,14 +111,14 @@ CString sPerm, sNick; vector<CClient*>& vpClients = m_pUser->GetClients(); - for (vector<CClient*>::iterator it = vpClients.begin(); it != vpClients.end(); it++) { + for (vector<CClient*>::iterator it = vpClients.begin(); it != vpClients.end(); ++it) { CClient* pThisClient; if (!pClient) pThisClient = *it; else pThisClient = pClient; - for (map<CString,CNick*>::iterator a = m_msNicks.begin(); a != m_msNicks.end(); a++) { + for (map<CString,CNick*>::iterator a = m_msNicks.begin(); a != m_msNicks.end(); ++a) { if (pThisClient->HasNamesx()) { sPerm = a->second->GetPermStr(); } else { @@ -172,7 +172,7 @@ CString CChan::GetModeString() const { CString sModes, sArgs; - for (map<unsigned char, CString>::const_iterator it = m_musModes.begin(); it != m_musModes.end(); it++) { + for (map<unsigned char, CString>::const_iterator it = m_musModes.begin(); it != m_musModes.end(); ++it) { sModes += it->first; if (it->second.size()) { sArgs += " " + it->second; @@ -185,7 +185,7 @@ CString CChan::GetModeForNames() const { CString sMode; - for (map<unsigned char, CString>::const_iterator it = m_musModes.begin(); it != m_musModes.end(); it++) { + for (map<unsigned char, CString>::const_iterator it = m_musModes.begin(); it != m_musModes.end(); ++it) { if (it->first == 's') { sMode = "@"; } else if ((it->first == 'p') && sMode.empty()){ @@ -365,7 +365,7 @@ } void CChan::ClearNicks() { - for (map<CString,CNick*>::iterator a = m_msNicks.begin(); a != m_msNicks.end(); a++) { + for (map<CString,CNick*>::iterator a = m_msNicks.begin(); a != m_msNicks.end(); ++a) { delete a->second; } @@ -379,7 +379,7 @@ sNicks.Split(" ", vsNicks, false); - for (it = vsNicks.begin(); it != vsNicks.end(); it++) { + for (it = vsNicks.begin(); it != vsNicks.end(); ++it) { if (AddNick(*it)) { iRet++; } @@ -439,7 +439,7 @@ map<char, unsigned int> mRet; map<CString,CNick*>::const_iterator it; - for (it = m_msNicks.begin(); it != m_msNicks.end(); it++) { + for (it = m_msNicks.begin(); it != m_msNicks.end(); ++it) { CString sPerms = it->second->GetPermStr(); for (unsigned int p = 0; p < sPerms.size(); p++) { Modified: trunk/ClientCommand.cpp =================================================================== --- trunk/ClientCommand.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/ClientCommand.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -71,7 +71,7 @@ Table.AddColumn("Ident"); Table.AddColumn("Host"); - for (map<CString,CNick*>::const_iterator a = msNicks.begin(); a != msNicks.end(); a++) { + for (map<CString,CNick*>::const_iterator a = msNicks.begin(); a != msNicks.end(); ++a) { Table.AddRow(); for (unsigned int b = 0; b < sPerms.size(); b++) { @@ -168,7 +168,7 @@ Table.AddColumn("IRC User"); Table.AddColumn("Channels"); - for (map<CString, CUser*>::const_iterator it = msUsers.begin(); it != msUsers.end(); it++) { + for (map<CString, CUser*>::const_iterator it = msUsers.begin(); it != msUsers.end(); ++it) { Table.AddRow(); Table.SetCell("Username", it->first); Table.SetCell("Clients", CString(it->second->GetClients().size())); @@ -611,7 +611,7 @@ GTable.AddColumn("Description"); set<CModInfo>::iterator it; - for (it = ssGlobalMods.begin(); it != ssGlobalMods.end(); it++) { + for (it = ssGlobalMods.begin(); it != ssGlobalMods.end(); ++it) { const CModInfo& Info = *it; GTable.AddRow(); GTable.SetCell("Name", (CZNC::Get().GetModules().FindModule(Info.GetName()) ? "*" : " ") + Info.GetName()); @@ -634,7 +634,7 @@ Table.AddColumn("Description"); set<CModInfo>::iterator it; - for (it = ssUserMods.begin(); it != ssUserMods.end(); it++) { + for (it = ssUserMods.begin(); it != ssUserMods.end(); ++it) { const CModInfo& Info = *it; Table.AddRow(); Table.SetCell("Name", (m_pUser->GetModules().FindModule(Info.GetName()) ? "*" : " ") + Info.GetName()); @@ -834,7 +834,7 @@ Table.AddColumn("VHost"); VCString::const_iterator it; - for (it = vsVHosts.begin(); it != vsVHosts.end(); it++) { + for (it = vsVHosts.begin(); it != vsVHosts.end(); ++it) { Table.AddRow(); Table.SetCell("VHost", *it); } @@ -857,7 +857,7 @@ VCString::const_iterator it; bool bFound = false; - for (it = vsVHosts.begin(); it != vsVHosts.end(); it++) { + for (it = vsVHosts.begin(); it != vsVHosts.end(); ++it) { if (sVHost.Equals(*it)) { bFound = true; break; @@ -927,7 +927,7 @@ vector<CChan*>::const_iterator it; const vector<CChan*>& vChans = m_pUser->GetChans(); - for (it = vChans.begin(); it != vChans.end(); it++) { + for (it = vChans.begin(); it != vChans.end(); ++it) { (*it)->ClearBuffer(); } PutStatus("All channel buffers have been cleared"); @@ -968,7 +968,7 @@ Table.AddColumn("Out"); Table.AddColumn("Total"); - for (it = traffic.begin(); it != traffic.end(); it++) { + for (it = traffic.begin(); it != traffic.end(); ++it) { Table.AddRow(); Table.SetCell("Username", it->first); Table.SetCell("In", CString::ToByteStr(it->second.first)); Modified: trunk/DCCBounce.cpp =================================================================== --- trunk/DCCBounce.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/DCCBounce.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -86,12 +86,10 @@ } void CDCCBounce::ReadData(const char* data, size_t len) { - size_t BufLen; - if (m_pPeer) { m_pPeer->Write(data, len); - BufLen = m_pPeer->GetInternalWriteBuffer().length(); + size_t BufLen = m_pPeer->GetInternalWriteBuffer().length(); if (BufLen >= m_uiMaxDCCBuffer) { DEBUG(GetSockName() << " The send buffer is over the " Modified: trunk/FileUtils.cpp =================================================================== --- trunk/FileUtils.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/FileUtils.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -490,7 +490,7 @@ // For every single subpath, do... sPath.Split("/", dirs, false); - for (it = dirs.begin(); it != dirs.end(); it++) { + for (it = dirs.begin(); it != dirs.end(); ++it) { // Add this to the path we already created sDir += *it; Modified: trunk/HTTPSock.cpp =================================================================== --- trunk/HTTPSock.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/HTTPSock.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -407,7 +407,7 @@ } Write("Content-Type: " + m_sContentType + "\r\n"); - for (MCString::iterator it = m_msHeaders.begin(); it != m_msHeaders.end(); it++) { + for (MCString::iterator it = m_msHeaders.begin(); it != m_msHeaders.end(); ++it) { Write(it->first + ": " + it->second + "\r\n"); } Modified: trunk/IRCSock.cpp =================================================================== --- trunk/IRCSock.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/IRCSock.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -49,7 +49,7 @@ m_pUser->IRCDisconnected(); - for (map<CString, CChan*>::iterator a = m_msChans.begin(); a != m_msChans.end(); a++) { + for (map<CString, CChan*>::iterator a = m_msChans.begin(); a != m_msChans.end(); ++a) { delete a->second; } @@ -861,7 +861,7 @@ // otherwise, on reconnect, it might think it still // had user modes that it actually doesn't have. CString sUserMode; - for (set<unsigned char>::const_iterator it = m_scUserModes.begin(); it != m_scUserModes.end(); it++) { + for (set<unsigned char>::const_iterator it = m_scUserModes.begin(); it != m_scUserModes.end(); ++it) { sUserMode += *it; } if (!sUserMode.empty()) { @@ -1101,7 +1101,7 @@ } void CIRCSock::ResetChans() { - for (map<CString, CChan*>::iterator a = m_msChans.begin(); a != m_msChans.end(); a++) { + for (map<CString, CChan*>::iterator a = m_msChans.begin(); a != m_msChans.end(); ++a) { a->second->Reset(); } } Modified: trunk/Modules.cpp =================================================================== --- trunk/Modules.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Modules.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -744,7 +744,7 @@ } if (pModule->IsFake()) { - for (iterator it = begin(); it != end(); it++) { + for (iterator it = begin(); it != end(); ++it) { if (*it == pModule) { erase(it); sRetMsg = "Fake module [" + sMod + "] unloaded"; @@ -765,7 +765,7 @@ if (Unload) { Unload(pModule); - for (iterator it = begin(); it != end(); it++) { + for (iterator it = begin(); it != end(); ++it) { if (*it == pModule) { erase(it); break; Modified: trunk/Nick.cpp =================================================================== --- trunk/Nick.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Nick.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -57,7 +57,7 @@ CChan* pChan = vChans[a]; const map<CString,CNick*>& msNicks = pChan->GetNicks(); - for (map<CString,CNick*>::const_iterator it = msNicks.begin(); it != msNicks.end(); it++) { + for (map<CString,CNick*>::const_iterator it = msNicks.begin(); it != msNicks.end(); ++it) { if (it->first.Equals(m_sNick)) { vRetChans.push_back(pChan); continue; Modified: trunk/Socket.cpp =================================================================== --- trunk/Socket.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Socket.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -15,7 +15,7 @@ const_iterator it; unsigned int ret = 0; - for (it = begin(); it != end(); it++) { + for (it = begin(); it != end(); ++it) { CZNCSock *pSock = *it; // Logged in CClients have "USR::<username>" as their sockname if (pSock->GetRemoteIP() == sIP && pSock->GetSockName().Left(5) != "USR::") { Modified: trunk/Template.cpp =================================================================== --- trunk/Template.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Template.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -69,7 +69,7 @@ } CTemplate::~CTemplate() { - for (map<CString, vector<CTemplate*> >::iterator it = m_mvLoops.begin(); it != m_mvLoops.end(); it++) { + for (map<CString, vector<CTemplate*> >::iterator it = m_mvLoops.begin(); it != m_mvLoops.end(); ++it) { vector<CTemplate*>& vLoop = it->second; for (unsigned int a = 0; a < vLoop.size(); a++) { delete vLoop[a]; @@ -101,7 +101,7 @@ CString sFile(ResolveLiteral(sFilename)); - for (LCString::iterator it = m_lsPaths.begin(); it != m_lsPaths.end(); it++) { + for (LCString::iterator it = m_lsPaths.begin(); it != m_lsPaths.end(); ++it) { CString sRoot = *it; CString sFilePath(CDir::ChangeDir(sRoot, sFile)); @@ -323,7 +323,7 @@ if (sArgs.Token(1, true, " ").OptionSplit(msRow)) { CTemplate& NewRow = AddRow(sLoopName); - for (MCString::iterator it = msRow.begin(); it != msRow.end(); it++) { + for (MCString::iterator it = msRow.begin(); it != msRow.end(); ++it) { NewRow[it->first] = it->second; } } @@ -767,11 +767,11 @@ if (!vspTagHandlers.empty()) { // @todo this should go up to the top to grab handlers CTemplate* pTmpl = GetCurTemplate(); - CString sCustomOutput; if (sRet.empty()) { for (unsigned int j = 0; j < vspTagHandlers.size(); j++) { CSmartPtr<CTemplateTagHandler> spTagHandler = vspTagHandlers[j]; + CString sCustomOutput; if (!bFromIf && spTagHandler->HandleVar(*pTmpl, sArgs.Token(0), sArgs.Token(1, true), sCustomOutput)) { sRet = sCustomOutput; Modified: trunk/User.cpp =================================================================== --- trunk/User.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/User.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -125,7 +125,7 @@ map<CUser*, CString>::iterator it2; bool error = false; - for (it = Users.begin(); it != Users.end(); it++) { + for (it = Users.begin(); it != Users.end(); ++it) { CModule *pMod = it->second->GetModules().FindModule(sModule); if (pMod) { Affected[it->second] = pMod->GetArgs(); @@ -134,7 +134,7 @@ } CString sErr; - for (it2 = Affected.begin(); it2 != Affected.end(); it2++) { + for (it2 = Affected.begin(); it2 != Affected.end(); ++it2) { if (!it2->first->GetModules().LoadModule(sModule, it2->second, it2->first, sErr)) { error = true; DEBUG("Failed to reload [" << sModule << "] for [" << it2->first->GetUserName() @@ -287,7 +287,7 @@ CString sUserMode(""); const set<unsigned char>& scUserModes = GetIRCSock()->GetUserModes(); for (set<unsigned char>::const_iterator it = scUserModes.begin(); - it != scUserModes.end(); it++) { + it != scUserModes.end(); ++it) { sUserMode += *it; } if (!sUserMode.empty()) { @@ -366,7 +366,7 @@ // Allowed Hosts m_ssAllowedHosts.clear(); const set<CString>& ssHosts = User.GetAllowedHosts(); - for (set<CString>::const_iterator it = ssHosts.begin(); it != ssHosts.end(); it++) { + for (set<CString>::const_iterator it = ssHosts.begin(); it != ssHosts.end(); ++it) { AddAllowedHost(*it); } @@ -444,7 +444,7 @@ // CTCP Replies m_mssCTCPReplies.clear(); const MCString& msReplies = User.GetCTCPReplies(); - for (MCString::const_iterator it = msReplies.begin(); it != msReplies.end(); it++) { + for (MCString::const_iterator it = msReplies.begin(); it != msReplies.end(); ++it) { AddCTCPReply(it->first, it->second); } // !CTCP Replies @@ -490,7 +490,7 @@ } } - for (set<CString>::iterator it = ssUnloadMods.begin(); it != ssUnloadMods.end(); it++) { + for (set<CString>::iterator it = ssUnloadMods.begin(); it != ssUnloadMods.end(); ++it) { vCurMods.UnloadModule(*it); } // !Modules @@ -514,7 +514,7 @@ return true; } - for (set<CString>::const_iterator a = m_ssAllowedHosts.begin(); a != m_ssAllowedHosts.end(); a++) { + for (set<CString>::const_iterator a = m_ssAllowedHosts.begin(); a != m_ssAllowedHosts.end(); ++a) { if (sHostMask.WildCmp(*a)) { return true; } @@ -597,7 +597,7 @@ } bool CUser::DelChan(const CString& sName) { - for (vector<CChan*>::iterator a = m_vChans.begin(); a != m_vChans.end(); a++) { + for (vector<CChan*>::iterator a = m_vChans.begin(); a != m_vChans.end(); ++a) { if (sName.Equals((*a)->GetName())) { delete *a; m_vChans.erase(a); @@ -664,7 +664,7 @@ // Allow Hosts if (!m_ssAllowedHosts.empty()) { - for (set<CString>::iterator it = m_ssAllowedHosts.begin(); it != m_ssAllowedHosts.end(); it++) { + for (set<CString>::iterator it = m_ssAllowedHosts.begin(); it != m_ssAllowedHosts.end(); ++it) { PrintLine(File, "Allow", *it); } @@ -673,7 +673,7 @@ // CTCP Replies if (!m_mssCTCPReplies.empty()) { - for (MCString::iterator itb = m_mssCTCPReplies.begin(); itb != m_mssCTCPReplies.end(); itb++) { + for (MCString::iterator itb = m_mssCTCPReplies.begin(); itb != m_mssCTCPReplies.end(); ++itb) { PrintLine(File, "CTCPReply", itb->first.AsUpper() + " " + itb->second); } Modified: trunk/Utils.cpp =================================================================== --- trunk/Utils.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/Utils.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -40,7 +40,7 @@ EVP_PKEY *pKey = NULL; X509 *pCert = NULL; X509_NAME *pName = NULL; - int days = 365; + const int days = 365; u_int iSeed = time(NULL); int serial = (rand_r(&iSeed) % 9999); Modified: trunk/ZNCString.cpp =================================================================== --- trunk/ZNCString.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/ZNCString.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -1018,7 +1018,7 @@ return MCS_EOPEN; } - for (MCString::iterator it = this->begin(); it != this->end(); it++) { + for (MCString::iterator it = this->begin(); it != this->end(); ++it) { CString sKey = it->first; CString sValue = it->second; if (!WriteFilter(sKey, sValue)) { @@ -1070,7 +1070,7 @@ CString& MCString::Encode(CString& sValue) { CString sTmp; - for (CString::iterator it = sValue.begin(); it != sValue.end(); it++) { + for (CString::iterator it = sValue.begin(); it != sValue.end(); ++it) { if (isalnum(*it)) { sTmp += *it; } else { Modified: trunk/modules/admin.cpp =================================================================== --- trunk/modules/admin.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/admin.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -433,7 +433,7 @@ Table.AddColumn("Ident"); Table.AddColumn("VHost"); - for (map<CString, CUser*>::const_iterator it = msUsers.begin(); it != msUsers.end(); it++) { + for (map<CString, CUser*>::const_iterator it = msUsers.begin(); it != msUsers.end(); ++it) { Table.AddRow(); Table.SetCell("Username", it->first); Table.SetCell("Realname", it->second->GetRealName()); Modified: trunk/modules/autoattach.cpp =================================================================== --- trunk/modules/autoattach.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/autoattach.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -30,7 +30,7 @@ // Load our saved settings, ignore errors MCString::iterator it; - for (it = BeginNV(); it != EndNV(); it++) { + for (it = BeginNV(); it != EndNV(); ++it) { Add(it->first); } @@ -125,12 +125,12 @@ if (sInput.Left(1) == "!") { CString sChan = sInput.substr(1); for (it = m_vsNegChans.begin(); it != m_vsNegChans.end(); - it++) { + ++it) { if (*it == sChan) return true; } } else { - for (it = m_vsChans.begin(); it != m_vsChans.end(); it++) { + for (it = m_vsChans.begin(); it != m_vsChans.end(); ++it) { if (*it == sInput) return true; } Modified: trunk/modules/autocycle.cpp =================================================================== --- trunk/modules/autocycle.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/autocycle.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -28,7 +28,7 @@ // Load our saved settings, ignore errors MCString::iterator it; - for (it = BeginNV(); it != EndNV(); it++) { + for (it = BeginNV(); it != EndNV(); ++it) { Add(it->first); } @@ -137,12 +137,12 @@ if (sInput.Left(1) == "!") { CString sChan = sInput.substr(1); for (it = m_vsNegChans.begin(); it != m_vsNegChans.end(); - it++) { + ++it) { if (*it == sChan) return true; } } else { - for (it = m_vsChans.begin(); it != m_vsChans.end(); it++) { + for (it = m_vsChans.begin(); it != m_vsChans.end(); ++it) { if (*it == sInput) return true; } Modified: trunk/modules/autoop.cpp =================================================================== --- trunk/modules/autoop.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/autoop.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -52,7 +52,7 @@ const CString& GetHostmask() const { return m_sHostmask; } bool ChannelMatches(const CString& sChan) const { - for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); it++) { + for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); ++it) { if (sChan.AsLower().WildCmp(*it)) { return true; } @@ -68,7 +68,7 @@ CString GetChannels() const { CString sRet; - for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); it++) { + for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); ++it) { if (!sRet.empty()) { sRet += " "; } @@ -100,7 +100,7 @@ CString ToString() const { CString sChans; - for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); it++) { + for (set<CString>::const_iterator it = m_ssChans.begin(); it != m_ssChans.end(); ++it) { if (!sChans.empty()) { sChans += " "; } @@ -135,7 +135,7 @@ AddTimer(new CAutoOpTimer(this)); // Load the users - for (MCString::iterator it = BeginNV(); it != EndNV(); it++) { + for (MCString::iterator it = BeginNV(); it != EndNV(); ++it) { const CString& sLine = it->second; CAutoOpUser* pUser = new CAutoOpUser; @@ -150,7 +150,7 @@ } virtual ~CAutoOpMod() { - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { delete it->second; } @@ -160,7 +160,7 @@ virtual void OnJoin(const CNick& Nick, CChan& Channel) { // If we have ops in this chan if (Channel.HasPerm(CChan::Op)) { - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { // and the nick who joined is a valid user if (it->second->HostMatches(Nick.GetHostMask()) && it->second->ChannelMatches(Channel.GetName())) { if (it->second->GetUserKey().Equals("__NOKEY__")) { @@ -249,7 +249,7 @@ Table.AddColumn("Key"); Table.AddColumn("Channels"); - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { Table.AddRow(); Table.SetCell("User", it->second->GetUsername()); Table.SetCell("Hostmask", it->second->GetHostmask()); @@ -295,7 +295,7 @@ } CAutoOpUser* FindUserByHost(const CString& sHostmask, const CString& sChannel = "") { - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { CAutoOpUser* pUser = it->second; if (pUser->HostMatches(sHostmask) && (sChannel.empty() || pUser->ChannelMatches(sChannel))) { @@ -337,7 +337,7 @@ bool bMatchedHost = false; CAutoOpUser* pUser = NULL; - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { pUser = it->second; // First verify that the guy who challenged us matches a user's host @@ -396,7 +396,7 @@ CString sChallenge = itQueue->second; m_msQueue.erase(itQueue); - for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { + for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { if (it->second->HostMatches(Nick.GetHostMask())) { if (sResponse == CString(it->second->GetUserKey() + "::" + sChallenge).MD5()) { OpUser(Nick, *it->second); @@ -420,7 +420,7 @@ while (bRemoved) { bRemoved = false; - for (MCString::iterator it = m_msQueue.begin(); it != m_msQueue.end(); it++) { + for (MCString::iterator it = m_msQueue.begin(); it != m_msQueue.end(); ++it) { if (!it->second.empty()) { m_msQueue.erase(it); bRemoved = true; @@ -430,7 +430,7 @@ } // Now issue challenges for the new users in the queue - for (MCString::iterator it = m_msQueue.begin(); it != m_msQueue.end(); it++) { + for (MCString::iterator it = m_msQueue.begin(); it != m_msQueue.end(); ++it) { it->second = CString::RandomString(AUTOOP_CHALLENGE_LENGTH); PutIRC("NOTICE " + it->first + " :!ZNCAO CHALLENGE " + it->second); } Modified: trunk/modules/away.cpp =================================================================== --- trunk/modules/away.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/away.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -96,7 +96,7 @@ sFile.Split("\n", vsLines); - for (it = vsLines.begin(); it != vsLines.end(); it++) { + for (it = vsLines.begin(); it != vsLines.end(); ++it) { CString sLine(*it); sLine.Trim(); AddMessage(sLine); @@ -248,7 +248,7 @@ sTmp += sMessage; msvOutput[sWhom].push_back(sTmp); } - for (map< CString, vector< CString> >::iterator it = msvOutput.begin(); it != msvOutput.end(); it++) + for (map< CString, vector< CString> >::iterator it = msvOutput.begin(); it != msvOutput.end(); ++it) { PutModule(it->first, "away"); for (u_int a = 0; a < it->second.size(); a++) Modified: trunk/modules/buffextras.cpp =================================================================== --- trunk/modules/buffextras.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/buffextras.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -38,7 +38,7 @@ virtual void OnQuit(const CNick& Nick, const CString& sMessage, const vector<CChan*>& vChans) { vector<CChan*>::const_iterator it; CString sMsg = Nick.GetNickMask() + " quit with message: [" + sMessage + "]"; - for (it = vChans.begin(); it != vChans.end(); it++) { + for (it = vChans.begin(); it != vChans.end(); ++it) { AddBuffer(**it, sMsg); } } @@ -54,7 +54,7 @@ virtual void OnNick(const CNick& OldNick, const CString& sNewNick, const vector<CChan*>& vChans) { vector<CChan*>::const_iterator it; CString sMsg = OldNick.GetNickMask() + " is now known as " + sNewNick; - for (it = vChans.begin(); it != vChans.end(); it++) { + for (it = vChans.begin(); it != vChans.end(); ++it) { AddBuffer(**it, sMsg); } } Modified: trunk/modules/chansaver.cpp =================================================================== --- trunk/modules/chansaver.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/chansaver.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -19,7 +19,7 @@ m_bWriteConf = false; - for (; it != end; it++) { + for (; it != end; ++it) { CChan *pChan = *it; // If that channel isn't yet in the config, Modified: trunk/modules/crypt.cpp =================================================================== --- trunk/modules/crypt.cpp 2010-02-19 10:21:33 UTC (rev 1775) +++ trunk/modules/crypt.cpp 2010-02-19 16:21:07 UTC (rev 1776) @@ -124,7 +124,7 @@ Table.AddColumn("Target"); Table.AddColumn("Key"); - for (MCString::iterator it = BeginNV(); it != EndNV(); it++) { + for (MCString::iterator it = BeginNV(); it != EndNV(); ++it) { Table.AddRow(); Table.SetCell("Target", it->first); Table.SetCell("Key", it->second); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |