mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "UpdateData.h"
|
||||
#include "GridDefines.h"
|
||||
#include "Object.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <ace/Thread_Mutex.h>
|
||||
#include <unordered_map>
|
||||
#include <set>
|
||||
@@ -87,7 +86,6 @@ public:
|
||||
|
||||
class ObjectAccessor
|
||||
{
|
||||
friend class ACE_Singleton<ObjectAccessor, ACE_Null_Mutex>;
|
||||
private:
|
||||
ObjectAccessor();
|
||||
~ObjectAccessor();
|
||||
@@ -95,6 +93,7 @@ class ObjectAccessor
|
||||
ObjectAccessor& operator=(const ObjectAccessor&);
|
||||
|
||||
public:
|
||||
static ObjectAccessor* instance();
|
||||
// TODO: override these template functions for each holder type and add assertions
|
||||
|
||||
template<class T> static T* GetObjectInOrOutOfWorld(uint64 guid, T* /*typeSpecifier*/)
|
||||
@@ -277,5 +276,6 @@ class ObjectAccessor
|
||||
mutable ACE_Thread_Mutex DelayedCorpseLock;
|
||||
};
|
||||
|
||||
#define sObjectAccessor ACE_Singleton<ObjectAccessor, ACE_Null_Mutex>::instance()
|
||||
#define sObjectAccessor ObjectAccessor::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user