aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptSystem.h
diff options
context:
space:
mode:
authorleak <leak@bitmx.net>2014-07-01 00:54:09 +0200
committerleak <leak@bitmx.net>2014-07-01 00:54:09 +0200
commit029bad6698df6ac9556fe308342e616f4a7a8cc7 (patch)
tree01142dad7e748aba7799b9c296ccc4cf11db886f /src/server/game/Scripting/ScriptSystem.h
parentd39a013b6b979a5158bf86c37a197cb902b2c2f9 (diff)
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)
Diffstat (limited to 'src/server/game/Scripting/ScriptSystem.h')
-rw-r--r--src/server/game/Scripting/ScriptSystem.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 11120f3031b..636343838c1 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -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