diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 14 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treeserver.h | 8 |
2 files changed, 2 insertions, 20 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 6eb9dd3c6..534315ff7 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -112,7 +112,7 @@ TreeServer::TreeServer(const std::string& Name, const std::string& Desc, const s */ this->AddHashEntry(); - Parent->AddChild(this); + Parent->Children.push_back(this); } void TreeServer::BeginBurst(unsigned long startms) @@ -163,7 +163,7 @@ void TreeServer::FinishBurst() void TreeServer::SQuitChild(TreeServer* server, const std::string& reason) { DelServerEvent(Utils->Creator, server->GetName()); - DelChild(server); + stdalgo::erase(Children, server); if (IsRoot()) { @@ -282,16 +282,6 @@ void TreeServer::SetPingFlag() LastPingWasGood = true; } -void TreeServer::AddChild(TreeServer* Child) -{ - Children.push_back(Child); -} - -bool TreeServer::DelChild(TreeServer* Child) -{ - return stdalgo::erase(Children, Child); -} - CullResult TreeServer::cull() { // Recursively cull all servers that are under us in the tree diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index d7fbfdf53..4465de15e 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -204,14 +204,6 @@ class TreeServer : public Server */ const ChildServers& GetChildren() const { return Children; } - /** Add a child server - */ - void AddChild(TreeServer* Child); - - /** Delete a child server, return false if it didn't exist. - */ - bool DelChild(TreeServer* Child); - /** Get server ID */ const std::string& GetID() const { return sid; } |