mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -21,6 +21,12 @@ GroupMgr::~GroupMgr()
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
GroupMgr* GroupMgr::instance()
|
||||
{
|
||||
static GroupMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void GroupMgr::InitGroupIds()
|
||||
{
|
||||
_nextGroupId = 1;
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
|
||||
class GroupMgr
|
||||
{
|
||||
friend class ACE_Singleton<GroupMgr, ACE_Null_Mutex>;
|
||||
private:
|
||||
GroupMgr();
|
||||
~GroupMgr();
|
||||
|
||||
public:
|
||||
static GroupMgr* instance();
|
||||
|
||||
typedef std::map<uint32, Group*> GroupContainer;
|
||||
|
||||
Group* GetGroupByGUID(uint32 guid) const;
|
||||
@@ -37,6 +38,6 @@ protected:
|
||||
GroupContainer GroupStore;
|
||||
};
|
||||
|
||||
#define sGroupMgr ACE_Singleton<GroupMgr, ACE_Null_Mutex>::instance()
|
||||
#define sGroupMgr GroupMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user