From 503ba19ec18ded4d1b373c799b795e39262088e3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 28 Jul 2014 14:35:20 +0200 Subject: m_spanningtree Remove now unused TreeServer::Tidy() --- src/modules/m_spanningtree/treeserver.cpp | 19 ------------------- src/modules/m_spanningtree/treeserver.h | 6 ------ 2 files changed, 25 deletions(-) diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index ef0fe4472..d758785d4 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -330,25 +330,6 @@ bool TreeServer::DelChild(TreeServer* Child) return false; } -/** Removes child nodes of this node, and of that node, etc etc. - * This is used during netsplits to automatically tidy up the - * server tree. It is slow, we don't use it for much else. - */ -void TreeServer::Tidy() -{ - while (1) - { - std::vector::iterator a = Children.begin(); - if (a == Children.end()) - return; - TreeServer* s = *a; - s->Tidy(); - s->cull(); - Children.erase(a); - delete s; - } -} - 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 88b43d182..69305a240 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -203,12 +203,6 @@ class TreeServer : public Server */ bool DelChild(TreeServer* Child); - /** Removes child nodes of this node, and of that node, etc etc. - * This is used during netsplits to automatically tidy up the - * server tree. It is slow, we don't use it for much else. - */ - void Tidy(); - /** Get server ID */ const std::string& GetID(); -- cgit v1.2.3