summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-20 17:49:04 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-20 17:49:04 +0100
commit50ea7f41b2e4aca9ef9be31c056f862a7d90609a (patch)
tree77996e22d6ceb6da88f743395953444b70f3a15b /src
parent4bb972550e79292c5571714103780d873f5e82aa (diff)
m_spanningtree Remove public TreeServer methods that are only called from TreeServer
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp14
-rw-r--r--src/modules/m_spanningtree/treeserver.h8
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; }