mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core: Converted (hopefully) all remaining singletons to use ACE_Singleton class
--HG-- branch : trunk
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#ifndef SC_SYSTEM_H
|
||||
#define SC_SYSTEM_H
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
|
||||
|
||||
@@ -51,13 +52,10 @@ struct StringTextData
|
||||
|
||||
class SystemMgr
|
||||
{
|
||||
public:
|
||||
|
||||
SystemMgr();
|
||||
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
|
||||
SystemMgr() {}
|
||||
~SystemMgr() {}
|
||||
|
||||
static SystemMgr& Instance();
|
||||
|
||||
public:
|
||||
//Maps and lists
|
||||
typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
|
||||
typedef UNORDERED_MAP<uint32, std::vector<ScriptPointMove> > PointMoveMap;
|
||||
@@ -97,6 +95,6 @@ class SystemMgr
|
||||
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
|
||||
};
|
||||
|
||||
#define sScriptSystemMgr SystemMgr::Instance()
|
||||
#define sScriptSystemMgr (*ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance())
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user