From 7264a6a8d4360989ca2f64230da07c562d0f34f1 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 19 Jul 2013 13:40:07 +0200 Subject: m_spanningtree Add TreeServer::GetChildren() that replaces ChildCount() and GetChild() --- src/modules/m_spanningtree/treesocket1.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/treesocket1.cpp') 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 */ -- cgit v1.2.3