]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix some incorrect STL iterations (using < end() instead of != end())
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 14 May 2009 01:12:20 +0000 (01:12 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 14 May 2009 01:12:20 +0000 (01:12 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11385 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/treeserver.cpp
src/modules/m_spanningtree/utils.cpp
src/modules/m_timedbans.cpp

index bffcf0576385af8a2564e38fbd693095e3f81e81..a9f61221d5f7639124abe4b7ab4a03598488678a 100644 (file)
@@ -316,7 +316,7 @@ void TreeServer::AddChild(TreeServer* Child)
 
 bool TreeServer::DelChild(TreeServer* Child)
 {
-       for (std::vector<TreeServer*>::iterator a = Children.begin(); a < Children.end(); a++)
+       for (std::vector<TreeServer*>::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<TreeServer*>::iterator a = Children.begin(); a < Children.end(); a++)
+               for (std::vector<TreeServer*>::iterator a = Children.begin(); a != Children.end(); a++)
                {
                        TreeServer* s = (TreeServer*)*a;
                        s->Tidy();
index 4ea5513ed98d395286ad08ca749ae550da249c40..3c4d32c29ac0402e3f61a9a3b2cc6d2b049d2953 100644 (file)
@@ -664,7 +664,7 @@ void SpanningTreeUtilities::DoFailOver(Link* x)
 
 Link* SpanningTreeUtilities::FindLink(const std::string& name)
 {
-       for (std::vector<Link>::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++)
+       for (std::vector<Link>::iterator x = LinkBlocks.begin(); x != LinkBlocks.end(); x++)
        {
                if (InspIRCd::Match(x->Name.c_str(), name.c_str()))
                {
index 07a5d8c990e894282b5cb4f22c2a845c26d3502d..39c05add9b9100361605aceb049115e80e38fa30 100644 (file)
@@ -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;