diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-14 16:15:38 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-14 16:15:38 +0200 |
commit | fb8cb2114483689c5a52f951e301c31bdd2a60a2 (patch) | |
tree | 5a9b7151400618402451eb054e1c7fd78e185d12 | |
parent | 04ece67c3d8534f74a3d75ec77378cb57a9c044e (diff) |
Remove typedef UserMembCIter, use Channel::MemberMap::const_iterator instead
-rw-r--r-- | include/typedefs.h | 2 | ||||
-rw-r--r-- | src/coremods/core_who.cpp | 2 | ||||
-rw-r--r-- | src/mode.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_auditorium.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_channames.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_clearchan.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_deaf.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_delayjoin.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_delaymsg.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ircv3.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_repeat.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rmode.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_silence.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sslmodes.cpp | 2 |
19 files changed, 22 insertions, 24 deletions
diff --git a/include/typedefs.h b/include/typedefs.h index c883a0859..a99f44fa2 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -104,8 +104,6 @@ typedef std::map<std::string, file_cache> ConfigFileCache; typedef std::map<User*, Membership*> UserMembList; /** Iterator of UserMembList */ typedef UserMembList::iterator UserMembIter; -/** const Iterator of UserMembList */ -typedef UserMembList::const_iterator UserMembCIter; /** Generic user list, used for exceptions */ typedef std::set<User*> CUList; diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index 6014401d8..ba67d0700 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -326,7 +326,7 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User * /* who on a channel. */ const Channel::MemberMap& cu = ch->GetUsers(); - for (UserMembCIter i = cu.begin(); i != cu.end(); ++i) + for (Channel::MemberMap::const_iterator i = cu.begin(); i != cu.end(); ++i) { /* None of this applies if we WHO ourselves */ if (user != i->first) diff --git a/src/mode.cpp b/src/mode.cpp index daf7c5021..7deeb9b32 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -916,7 +916,7 @@ void ModeHandler::RemoveMode(Channel* channel, irc::modestacker& stack) void PrefixMode::RemoveMode(Channel* chan, irc::modestacker& stack) { const Channel::MemberMap& userlist = chan->GetUsers(); - for (UserMembCIter i = userlist.begin(); i != userlist.end(); ++i) + for (Channel::MemberMap::const_iterator i = userlist.begin(); i != userlist.end(); ++i) { if (i->second->hasMode(this->GetModeChar())) stack.Push(this->GetModeChar(), i->first->nick); diff --git a/src/modules.cpp b/src/modules.cpp index f29ab6bbb..9a61a7226 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -392,7 +392,7 @@ void ModuleManager::DoSafeUnload(Module* mod) mod->OnCleanup(TYPE_CHANNEL, chan); chan->doUnhookExtensions(items); const Channel::MemberMap& users = chan->GetUsers(); - for (UserMembCIter mi = users.begin(); mi != users.end(); ++mi) + for (Channel::MemberMap::const_iterator mi = users.begin(); mi != users.end(); ++mi) mi->second->doUnhookExtensions(items); } diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 70f17e908..7ad7ba1a3 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -104,7 +104,7 @@ class ModuleAuditorium : public Module return; const Channel::MemberMap& users = memb->chan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) { if (IS_LOCAL(i->first) && !CanSee(i->first, memb)) excepts.insert(i->first); @@ -141,7 +141,7 @@ class ModuleAuditorium : public Module i = include.erase(i); // however, that might hide me from ops that can see me... const Channel::MemberMap& users = memb->chan->GetUsers(); - for(UserMembCIter j = users.begin(); j != users.end(); ++j) + for(Channel::MemberMap::const_iterator j = users.begin(); j != users.end(); ++j) { if (IS_LOCAL(j->first) && CanSee(j->first, memb)) exception[j->first] = true; diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index b4266e63b..1483d8cd7 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -133,7 +133,7 @@ class ModuleChannelNames : public Module if (badchan) { const Channel::MemberMap& users = memb->chan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) if (i->first != memb->user) except_list.insert(i->first); } diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index ce576baf1..75c6a4399 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -227,7 +227,7 @@ class CommandCheck : public Command const Channel::MemberMap& ulist = targchan->GetUsers(); /* note that unlike /names, we do NOT check +i vs in the channel */ - for (UserMembCIter i = ulist.begin(); i != ulist.end(); ++i) + for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i) { /* * Unlike Asuka, I define a clone as coming from the same host. --w00t diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index e23cd66c2..6238b7fdf 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -171,7 +171,7 @@ class ModuleClearChan : public Module } const Channel::MemberMap& users = cmd.activechan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) { LocalUser* curr = IS_LOCAL(i->first); if (!curr) @@ -201,7 +201,7 @@ class ModuleClearChan : public Module // Hide the KICK from all non-opers User* leaving = memb->user; const Channel::MemberMap& users = memb->chan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) { User* curr = i->first; if ((IS_LOCAL(curr)) && (!curr->IsOper()) && (curr != leaving)) diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index aaca6c049..fd9b322c0 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -77,7 +77,7 @@ class ModuleDeaf : public Module return MOD_RES_PASSTHRU; const Channel::MemberMap& ulist = chan->GetUsers(); - for (UserMembCIter i = ulist.begin(); i != ulist.end(); ++i) + for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i) { /* not +d ? */ if (!i->first->IsModeSet(m1)) diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index d9884297f..55ffd08d7 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -67,7 +67,7 @@ ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channe * they remain permanently invisible on this channel! */ const Channel::MemberMap& users = channel->GetUsers(); - for (UserMembCIter n = users.begin(); n != users.end(); ++n) + for (Channel::MemberMap::const_iterator n = users.begin(); n != users.end(); ++n) creator->OnText(n->first, channel, TYPE_CHANNEL, "", 0, empty); } channel->SetMode(this, adding); @@ -95,7 +95,7 @@ ModResult ModuleDelayJoin::OnNamesListItem(User* issuer, Membership* memb, std:: static void populate(CUList& except, Membership* memb) { const Channel::MemberMap& users = memb->chan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) { if (i->first == memb->user || !IS_LOCAL(i->first)) continue; diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index e782b807a..06a05db02 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -74,7 +74,7 @@ void DelayMsgMode::OnUnset(User* source, Channel* chan) * Clean up metadata */ const Channel::MemberMap& users = chan->GetUsers(); - for (UserMembCIter n = users.begin(); n != users.end(); ++n) + for (Channel::MemberMap::const_iterator n = users.begin(); n != users.end(); ++n) jointime.set(n->second, 0); } diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index acf5c66a7..84cca7e01 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -164,7 +164,7 @@ class ModuleHttpStats : public Module data << "<channelmodes>" << Sanitize(c->ChanModes(true)) << "</channelmodes>"; const Channel::MemberMap& ulist = c->GetUsers(); - for (UserMembCIter x = ulist.begin(); x != ulist.end(); ++x) + for (Channel::MemberMap::const_iterator x = ulist.begin(); x != ulist.end(); ++x) { Membership* memb = x->second; data << "<channelmember><uid>" << memb->user->uuid << "</uid><privs>" diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index 65fb7ddb5..4eb54d2a6 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -135,7 +135,7 @@ class ModuleIRCv3 : public Module std::string mode; const Channel::MemberMap& userlist = memb->chan->GetUsers(); - for (UserMembCIter it = userlist.begin(); it != userlist.end(); ++it) + for (Channel::MemberMap::const_iterator it = userlist.begin(); it != userlist.end(); ++it) { // Send the extended join line if the current member is local, has the extended-join cap and isn't excepted User* member = IS_LOCAL(it->first); @@ -209,7 +209,7 @@ class ModuleIRCv3 : public Module std::string line = ":" + memb->user->GetFullHost() + " AWAY :" + memb->user->awaymsg; const Channel::MemberMap& userlist = memb->chan->GetUsers(); - for (UserMembCIter it = userlist.begin(); it != userlist.end(); ++it) + for (Channel::MemberMap::const_iterator it = userlist.begin(); it != userlist.end(); ++it) { // Send the away notify line if the current member is local, has the away-notify cap and isn't excepted User* member = IS_LOCAL(it->first); diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index d55a141da..b992fe0f4 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -130,7 +130,7 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> > { // Unset the per-membership extension when the mode is removed const Channel::MemberMap& users = chan->GetUsers(); - for (UserMembCIter i = users.begin(); i != users.end(); ++i) + for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) MemberInfoExt.unset(i->second); } diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp index dde9f496e..9bb7bcdcb 100644 --- a/src/modules/m_rmode.cpp +++ b/src/modules/m_rmode.cpp @@ -65,7 +65,7 @@ class CommandRMode : public Command if ((pm = mh->IsPrefixMode())) { // As user prefix modes don't have a GetList() method, let's iterate through the channel's users. - for (UserMembIter it = chan->userlist.begin(); it != chan->userlist.end(); ++it) + for (Channel::MemberMap::const_iterator it = chan->userlist.begin(); it != chan->userlist.end(); ++it) { if (!InspIRCd::Match(it->first->nick, pattern)) continue; diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index 7fd46d632..7298d77e1 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -317,7 +317,7 @@ class ModuleSilence : public Module int public_silence = (message_type == MSG_PRIVMSG ? SILENCE_CHANNEL : SILENCE_CNOTICE); const Channel::MemberMap& ulist = chan->GetUsers(); - for (UserMembCIter i = ulist.begin(); i != ulist.end(); ++i) + for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i) { if (IS_LOCAL(i->first)) { diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 3eaaaf720..295646148 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -169,7 +169,7 @@ void TreeSocket::SendFJoins(Channel* c) CommandFJoin::Builder fjoin(c); const Channel::MemberMap& ulist = c->GetUsers(); - for (UserMembCIter i = ulist.begin(); i != ulist.end(); ++i) + for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i) { Membership* memb = i->second; if (!fjoin.has_room(memb)) diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 1fa150741..d81bfa934 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -167,7 +167,7 @@ void SpanningTreeUtilities::GetListOfServersForChannel(Channel* c, TreeSocketSet } const Channel::MemberMap& ulist = c->GetUsers(); - for (UserMembCIter i = ulist.begin(); i != ulist.end(); ++i) + for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i) { if (IS_LOCAL(i->first)) continue; diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index af79ecab4..1a596f5e0 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -49,7 +49,7 @@ class SSLMode : public ModeHandler return MODEACTION_DENY; const Channel::MemberMap& userlist = channel->GetUsers(); - for (UserMembCIter i = userlist.begin(); i != userlist.end(); ++i) + for (Channel::MemberMap::const_iterator i = userlist.begin(); i != userlist.end(); ++i) { ssl_cert* cert = API->GetCertificate(i->first); if (!cert && !i->first->server->IsULine()) |