feat(Core/Misc): remove and replace ACE_Singleton (#2418)

This commit is contained in:
Kargatum
2019-12-21 00:29:29 +07:00
committed by GitHub
parent 16b45bf334
commit 4a8f1de538
88 changed files with 486 additions and 250 deletions

View File

@@ -11,7 +11,7 @@
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "ObjectDefines.h"
#include <ace/Singleton.h>
#include <ace/Null_Mutex.h>
#include <ace/Thread_Mutex.h>
#include <list>
@@ -98,7 +98,6 @@ typedef std::unordered_map<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTim
class InstanceSaveManager
{
friend class ACE_Singleton<InstanceSaveManager, ACE_Thread_Mutex>;
friend class InstanceSave;
private:
@@ -106,6 +105,8 @@ class InstanceSaveManager
~InstanceSaveManager();
public:
static InstanceSaveManager* instance();
typedef std::unordered_map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
struct InstResetEvent
@@ -189,5 +190,6 @@ class InstanceSaveManager
ResetTimeQueue m_resetTimeQueue;
};
#define sInstanceSaveMgr ACE_Singleton<InstanceSaveManager, ACE_Thread_Mutex>::instance()
#define sInstanceSaveMgr InstanceSaveManager::instance()
#endif