summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treeserver.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-07-19 13:40:07 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-22 13:42:20 +0200
commit7264a6a8d4360989ca2f64230da07c562d0f34f1 (patch)
treec2916ac67c8b547f234eb67206ccb7ced14e8860 /src/modules/m_spanningtree/treeserver.cpp
parent67de413cad88194972d55a8ff88464370890c5a9 (diff)
m_spanningtree Add TreeServer::GetChildren() that replaces ChildCount() and GetChild()
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 54ea5922f..8af3e777d 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -119,9 +119,9 @@ void TreeServer::FinishBurstInternal()
this->bursting = false;
SetNextPingTime(ServerInstance->Time() + Utils->PingFreq);
SetPingFlag();
- for(unsigned int q=0; q < ChildCount(); q++)
+ for (ChildServers::const_iterator i = Children.begin(); i != Children.end(); ++i)
{
- TreeServer* child = GetChild(q);
+ TreeServer* child = *i;
child->FinishBurstInternal();
}
}
@@ -229,28 +229,6 @@ void TreeServer::SetVersion(const std::string &Version)
VersionString = Version;
}
-unsigned int TreeServer::ChildCount()
-{
- return Children.size();
-}
-
-TreeServer* TreeServer::GetChild(unsigned int n)
-{
- if (n < Children.size())
- {
- /* Make sure they cant request
- * an out-of-range object. After
- * all we know what these programmer
- * types are like *grin*.
- */
- return Children[n];
- }
- else
- {
- return NULL;
- }
-}
-
void TreeServer::AddChild(TreeServer* Child)
{
Children.push_back(Child);