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

@@ -45,6 +45,12 @@ LFGMgr::~LFGMgr()
delete itr->second;
}
LFGMgr* LFGMgr::instance()
{
static LFGMgr instance;
return &instance;
}
void LFGMgr::_LoadFromDB(Field* fields, uint64 guid)
{
if (!fields)

View File

@@ -7,7 +7,6 @@
#ifndef _LFGMGR_H
#define _LFGMGR_H
#include <ace/Singleton.h>
#include "DBCStructure.h"
#include "Field.h"
#include "LFG.h"
@@ -379,8 +378,6 @@ struct LFGDungeonData
class LFGMgr
{
friend class ACE_Singleton<LFGMgr, ACE_Null_Mutex>;
private:
LFGMgr();
~LFGMgr();
@@ -401,6 +398,8 @@ class LFGMgr
RBUsedDungeonsSet RBUsedDungeonsStore[2]; // for 2 factions
public:
static LFGMgr* instance();
// Functions used outside lfg namespace
void Update(uint32 diff, uint8 task);
@@ -590,5 +589,6 @@ class LFGMgr
} // namespace lfg
#define sLFGMgr ACE_Singleton<lfg::LFGMgr, ACE_Null_Mutex>::instance()
#define sLFGMgr lfg::LFGMgr::instance()
#endif