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:
leak
2014-07-01 00:54:09 +02:00
parent d39a013b6b
commit 029bad6698
61 changed files with 347 additions and 243 deletions

View File

@@ -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