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 committed 2014-07-01 00:54:09 +02:00
1 parent d39a013b6b
commit 029bad6698
61 files changed
+347 -243

No files matched your search

@@ -1396,11 +1396,17 @@ typedef std::unordered_map<uint32, ObjectGuidList*> ObjectListMap;
class SmartWaypointMgr
{
friend class ACE_Singleton<SmartWaypointMgr, ACE_Null_Mutex>;
SmartWaypointMgr() { }
public:
private:
SmartWaypointMgr() { }
~SmartWaypointMgr();
public:
static SmartWaypointMgr* instance()
{
static SmartWaypointMgr* instance = new SmartWaypointMgr();
return instance;
}
void LoadFromDB();
WPPath* GetPath(uint32 id)
@@ -1426,11 +1432,17 @@ typedef std::pair<CacheSpellContainer::const_iterator, CacheSpellContainer::cons
class SmartAIMgr
{
friend class ACE_Singleton<SmartAIMgr, ACE_Null_Mutex>;
SmartAIMgr() { }
public:
private:
SmartAIMgr() { }
~SmartAIMgr() { }
public:
static SmartAIMgr* instance()
{
static SmartAIMgr* instance = new SmartAIMgr();
return instance;
}
void LoadSmartAIFromDB();
SmartAIEventList GetScript(int32 entry, SmartScriptType type)
@@ -1598,6 +1610,6 @@ class SmartAIMgr
CacheSpellContainer KillCreditSpellStore;
};
#define sSmartScriptMgr ACE_Singleton<SmartAIMgr, ACE_Null_Mutex>::instance()
#define sSmartWaypointMgr ACE_Singleton<SmartWaypointMgr, ACE_Null_Mutex>::instance()
#define sSmartScriptMgr SmartAIMgr::instance()
#define sSmartWaypointMgr SmartWaypointMgr::instance()
#endif