From 0f7657b68c8b6444fadb480cdd0f87631391afa5 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Fri, 25 Jun 2010 00:18:01 +0200 Subject: Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively. Also get rid of unused CountedReference class that used Trinity threading pattern. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : trunk --- src/server/worldserver/Master.cpp | 3 --- src/server/worldserver/Master.h | 3 +-- src/server/worldserver/WorldThread/WorldRunnable.cpp | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/server/worldserver') diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index 332a607dcad..fb2d828e284 100644 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -33,7 +33,6 @@ #include "WorldSocketMgr.h" #include "Configuration/ConfigEnv.h" #include "Database/DatabaseEnv.h" -#include "SingletonImp.h" #include "CliRunnable.h" #include "Log.h" @@ -58,8 +57,6 @@ extern int m_ServiceStatus; /// \todo Warning disabling not useful under VC++2005. Can somebody say on which compiler it is useful? #pragma warning(disable:4305) -INSTANTIATE_SINGLETON_1( Master ); - volatile uint32 Master::m_masterLoopCounter = 0; /// Handle cored's termination signals diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h index 76ff2af1457..00628827e2a 100644 --- a/src/server/worldserver/Master.h +++ b/src/server/worldserver/Master.h @@ -26,7 +26,6 @@ #define _MASTER_H #include "Common.h" -#include "Policies/Singleton.h" /// Start the server class Master @@ -43,6 +42,6 @@ class Master void clearOnlineAccounts(); }; -#define sMaster Trinity::Singleton::Instance() +#define sMaster (*ACE_Singleton::instance()) #endif /// @} diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp index 3531873ec0c..69639da62fa 100644 --- a/src/server/worldserver/WorldThread/WorldRunnable.cpp +++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp @@ -90,7 +90,7 @@ void WorldRunnable::run() sWorldSocketMgr->StopNetwork(); - MapManager::Instance().UnloadAll(); // unload all grids (including locked in memory) + sMapMgr.UnloadAll(); // unload all grids (including locked in memory) ///- End the database thread WorldDatabase.ThreadEnd(); // free mySQL thread resources -- cgit v1.2.3