mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -17,6 +17,12 @@ PetitionMgr::~PetitionMgr()
|
||||
{
|
||||
}
|
||||
|
||||
PetitionMgr* PetitionMgr::instance()
|
||||
{
|
||||
static PetitionMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void PetitionMgr::LoadPetitions()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -6,7 +6,7 @@ Xinef
|
||||
#define _PETITIONMGR_H
|
||||
|
||||
#include "Common.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <map>
|
||||
|
||||
typedef std::map<uint32, uint32> SignatureMap;
|
||||
|
||||
@@ -29,13 +29,13 @@ typedef std::map<uint32, Petition> PetitionContainer;
|
||||
|
||||
class PetitionMgr
|
||||
{
|
||||
friend class ACE_Singleton<PetitionMgr, ACE_Thread_Mutex>;
|
||||
|
||||
private:
|
||||
PetitionMgr();
|
||||
~PetitionMgr();
|
||||
|
||||
public:
|
||||
static PetitionMgr* instance();
|
||||
|
||||
void LoadPetitions();
|
||||
void LoadSignatures();
|
||||
|
||||
@@ -59,5 +59,6 @@ class PetitionMgr
|
||||
SignatureContainer SignatureStore;
|
||||
};
|
||||
|
||||
#define sPetitionMgr ACE_Singleton<PetitionMgr, ACE_Thread_Mutex>::instance()
|
||||
#define sPetitionMgr PetitionMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user