diff options
| author | leak <leak@bitmx.net> | 2014-07-01 00:54:09 +0200 |
|---|---|---|
| committer | leak <leak@bitmx.net> | 2014-07-01 00:54:09 +0200 |
| commit | 029bad6698df6ac9556fe308342e616f4a7a8cc7 (patch) | |
| tree | 01142dad7e748aba7799b9c296ccc4cf11db886f /src/server/game/Texts/CreatureTextMgr.h | |
| parent | d39a013b6b979a5158bf86c37a197cb902b2c2f9 (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/Texts/CreatureTextMgr.h')
| -rw-r--r-- | src/server/game/Texts/CreatureTextMgr.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index ab5b9f59032..f8c499f7ce6 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -82,11 +82,17 @@ typedef std::unordered_map<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMa class CreatureTextMgr { - friend class ACE_Singleton<CreatureTextMgr, ACE_Null_Mutex>; - CreatureTextMgr() { }; + private: + CreatureTextMgr() { }; + ~CreatureTextMgr() { }; public: - ~CreatureTextMgr() { }; + static CreatureTextMgr* instance() + { + static CreatureTextMgr* instance = new CreatureTextMgr(); + return instance; + } + void LoadCreatureTexts(); void LoadCreatureTextLocales(); CreatureTextMap const& GetTextMap() const { return mTextMap; } @@ -113,7 +119,7 @@ class CreatureTextMgr LocaleCreatureTextMap mLocaleTextMap; }; -#define sCreatureTextMgr ACE_Singleton<CreatureTextMgr, ACE_Null_Mutex>::instance() +#define sCreatureTextMgr CreatureTextMgr::instance() template<class Builder> class CreatureTextLocalizer |
