From 43e684071933adef93040e8d4b830d5c6b71cf9a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 12 Jan 2013 04:46:01 +0000 Subject: Merged branch "branches/hooks" into "trunk". git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/GroupManager.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'source/GroupManager.cpp') diff --git a/source/GroupManager.cpp b/source/GroupManager.cpp index 912f1196c..a474de9cb 100644 --- a/source/GroupManager.cpp +++ b/source/GroupManager.cpp @@ -12,16 +12,19 @@ typedef std::map< AString, cGroup* > GroupMap; + + + + + struct cGroupManager::sGroupManagerState { GroupMap Groups; }; -cGroupManager* cGroupManager::GetGroupManager() -{ - LOGWARN("WARNING: Using deprecated function cGroupManager::GetGroupManager() use cRoot::Get()->GetGroupManager() instead!"); - return cRoot::Get()->GetGroupManager(); -} + + + cGroupManager::~cGroupManager() { @@ -34,6 +37,10 @@ cGroupManager::~cGroupManager() delete m_pState; } + + + + cGroupManager::cGroupManager() : m_pState( new sGroupManagerState ) { @@ -98,6 +105,10 @@ cGroupManager::cGroupManager() LOG("-- Done Loading Groups --"); } + + + + cGroup* cGroupManager::GetGroup( const AString & a_Name ) { GroupMap::iterator itr = m_pState->Groups.find( a_Name ); @@ -110,5 +121,8 @@ cGroup* cGroupManager::GetGroup( const AString & a_Name ) m_pState->Groups[a_Name] = Group; return Group; +} + + + -} \ No newline at end of file -- cgit v1.2.3