From bc9352391f179dbe2a325ff36b00930c886ef1b3 Mon Sep 17 00:00:00 2001 From: special Date: Thu, 14 May 2009 01:12:20 +0000 Subject: Fix some incorrect STL iterations (using < end() instead of != end()) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11385 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treeserver.cpp | 4 ++-- src/modules/m_spanningtree/utils.cpp | 2 +- src/modules/m_timedbans.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index bffcf0576..a9f61221d 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -316,7 +316,7 @@ void TreeServer::AddChild(TreeServer* Child) bool TreeServer::DelChild(TreeServer* Child) { - for (std::vector::iterator a = Children.begin(); a < Children.end(); a++) + for (std::vector::iterator a = Children.begin(); a != Children.end(); a++) { if (*a == Child) { @@ -337,7 +337,7 @@ bool TreeServer::Tidy() while (stillchildren) { stillchildren = false; - for (std::vector::iterator a = Children.begin(); a < Children.end(); a++) + for (std::vector::iterator a = Children.begin(); a != Children.end(); a++) { TreeServer* s = (TreeServer*)*a; s->Tidy(); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 4ea5513ed..3c4d32c29 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -664,7 +664,7 @@ void SpanningTreeUtilities::DoFailOver(Link* x) Link* SpanningTreeUtilities::FindLink(const std::string& name) { - for (std::vector::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++) + for (std::vector::iterator x = LinkBlocks.begin(); x != LinkBlocks.end(); x++) { if (InspIRCd::Match(x->Name.c_str(), name.c_str())) { diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 07a5d8c99..39c05add9 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -134,7 +134,7 @@ class ModuleTimedBans : public Module { irc::string listitem = banmask.c_str(); irc::string thischan = chan->name.c_str(); - for (timedbans::iterator i = TimedBanList.begin(); i < TimedBanList.end(); i++) + for (timedbans::iterator i = TimedBanList.begin(); i != TimedBanList.end(); i++) { irc::string target = i->mask.c_str(); irc::string tchan = i->channel.c_str(); @@ -150,7 +150,7 @@ class ModuleTimedBans : public Module virtual void OnBackgroundTimer(time_t curtime) { timedbans::iterator safei; - for (timedbans::iterator i = TimedBanList.begin(); i < TimedBanList.end();) + for (timedbans::iterator i = TimedBanList.begin(); i != TimedBanList.end();) { /* Safe copy of iterator, so we can erase as we iterate */ safei = i; -- cgit v1.2.3