From 619c5eabb1834f2ec9e3b723243b679a62f0acd3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 6 Dec 2015 12:19:06 +0100 Subject: m_spanningtree Change allocation of ModuleSpanningTree::commands to be physically part of the object containing it --- src/modules/m_spanningtree/main.cpp | 4 +--- src/modules/m_spanningtree/main.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 4e45b4fe8..726376844 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -37,7 +37,7 @@ ModuleSpanningTree::ModuleSpanningTree() : rconnect(this), rsquit(this), map(this) - , commands(NULL) + , commands(this) , currmembid(0) , eventprov(this, "event/spanningtree") , DNS(this, "DNS") @@ -89,7 +89,6 @@ void ModuleSpanningTree::init() Utils = new SpanningTreeUtilities(this); Utils->TreeRoot = new TreeServer; - commands = new SpanningTreeCommands(this); ServerInstance->PI = &protocolinterface; @@ -736,7 +735,6 @@ ModuleSpanningTree::~ModuleSpanningTree() SetLocalUsersServer(newsrv); delete Utils; - delete commands; } Version ModuleSpanningTree::GetVersion() diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index d29609a35..3e02ce93f 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -44,7 +44,6 @@ const long MinCompatProtocol = 1202; /** Forward declarations */ -class SpanningTreeCommands; class SpanningTreeUtilities; class CacheRefreshTimer; class TreeServer; @@ -63,7 +62,7 @@ class ModuleSpanningTree : public Module /** Server to server only commands, not registered in the core */ - SpanningTreeCommands* commands; + SpanningTreeCommands commands; /** Next membership id assigned when a local user joins a channel */ -- cgit v1.2.3