mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -34,6 +34,12 @@ CalendarMgr::~CalendarMgr()
|
||||
delete *itr2;
|
||||
}
|
||||
|
||||
CalendarMgr* CalendarMgr::instance()
|
||||
{
|
||||
static CalendarMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void CalendarMgr::LoadFromDB()
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#ifndef ACORE_CALENDARMGR_H
|
||||
#define ACORE_CALENDARMGR_H
|
||||
|
||||
#include <ace/Singleton.h>
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "WorldPacket.h"
|
||||
@@ -257,8 +256,6 @@ typedef std::unordered_map<uint64 /* eventId */, CalendarInviteStore > CalendarE
|
||||
|
||||
class CalendarMgr
|
||||
{
|
||||
friend class ACE_Singleton<CalendarMgr, ACE_Null_Mutex>;
|
||||
|
||||
private:
|
||||
CalendarMgr();
|
||||
~CalendarMgr();
|
||||
@@ -272,6 +269,8 @@ class CalendarMgr
|
||||
uint64 _maxInviteId;
|
||||
|
||||
public:
|
||||
static CalendarMgr* instance();
|
||||
|
||||
void LoadFromDB();
|
||||
|
||||
CalendarEvent* GetEvent(uint64 eventId, CalendarEventStore::iterator* it = NULL);
|
||||
@@ -318,6 +317,6 @@ class CalendarMgr
|
||||
void SendPacketToAllEventRelatives(WorldPacket packet, CalendarEvent const& calendarEvent);
|
||||
};
|
||||
|
||||
#define sCalendarMgr ACE_Singleton<CalendarMgr, ACE_Null_Mutex>::instance()
|
||||
#define sCalendarMgr CalendarMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user