From fb7fef7a849342ab8463743497e781c5c3e6ae88 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 7 Apr 2013 23:46:44 -0500 Subject: Optimizations of much of the more commonly used code --- modules/commands/cs_enforce.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/commands/cs_enforce.cpp') diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index 4d5ba0242..fd5caf613 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -31,7 +31,7 @@ class CommandCSEnforce : public Command for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; ci->c->SetCorrectModes(uc->user, false, false); } @@ -50,7 +50,7 @@ class CommandCSEnforce : public Command std::vector users; for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; User *user = uc->user; if (user->IsProtected()) @@ -81,7 +81,7 @@ class CommandCSEnforce : public Command std::vector users; for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; User *user = uc->user; if (user->IsProtected()) @@ -113,7 +113,7 @@ class CommandCSEnforce : public Command std::vector users; for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; User *user = uc->user; if (user->IsProtected()) @@ -145,7 +145,7 @@ class CommandCSEnforce : public Command std::vector users; for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; User *user = uc->user; if (user->IsProtected()) @@ -195,7 +195,7 @@ class CommandCSEnforce : public Command /* The newer users are at the end of the list, so kick users starting from the end */ for (Channel::ChanUserList::reverse_iterator it = ci->c->users.rbegin(), it_end = ci->c->users.rend(); it != it_end; ++it) { - ChanUserContainer *uc = *it; + ChanUserContainer *uc = it->second; User *user = uc->user; if (user->IsProtected()) -- cgit