mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#define SC_SYSTEM_H
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
|
||||
|
||||
@@ -48,11 +47,17 @@ typedef std::vector<ScriptPointMove> ScriptPointVector;
|
||||
|
||||
class SystemMgr
|
||||
{
|
||||
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
|
||||
private:
|
||||
SystemMgr() { }
|
||||
~SystemMgr() { }
|
||||
|
||||
public:
|
||||
static SystemMgr* instance()
|
||||
{
|
||||
static SystemMgr* instance = new SystemMgr();
|
||||
return instance;
|
||||
}
|
||||
|
||||
typedef std::unordered_map<uint32, ScriptPointVector> PointMoveMap;
|
||||
|
||||
//Database
|
||||
@@ -75,6 +80,6 @@ class SystemMgr
|
||||
static ScriptPointVector const _empty;
|
||||
};
|
||||
|
||||
#define sScriptSystemMgr ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance()
|
||||
#define sScriptSystemMgr SystemMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user