diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-07-19 13:40:07 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-08-22 13:42:20 +0200 |
commit | 7264a6a8d4360989ca2f64230da07c562d0f34f1 (patch) | |
tree | c2916ac67c8b547f234eb67206ccb7ced14e8860 /src/modules/m_spanningtree/treesocket1.cpp | |
parent | 67de413cad88194972d55a8ff88464370890c5a9 (diff) |
m_spanningtree Add TreeServer::GetChildren() that replaces ChildCount() and GetChild()
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 9e0acdd12..ad3a6390d 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -150,9 +150,10 @@ void TreeSocket::SquitServer(std::string &from, TreeServer* Current, int& num_lo * We're going backwards so we don't remove users * while we still need them ;) */ - for (unsigned int q = 0; q < Current->ChildCount(); q++) + const TreeServer::ChildServers& children = Current->GetChildren(); + for (TreeServer::ChildServers::const_iterator i = children.begin(); i != children.end(); ++i) { - TreeServer* recursive_server = Current->GetChild(q); + TreeServer* recursive_server = *i; this->SquitServer(from,recursive_server, num_lost_servers, num_lost_users); } /* Now we've whacked the kids, whack self */ |