diff options
Diffstat (limited to 'src/server/authserver/Server/BattlenetManager.h')
| -rw-r--r-- | src/server/authserver/Server/BattlenetManager.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/authserver/Server/BattlenetManager.h b/src/server/authserver/Server/BattlenetManager.h index 3b8a145f4e9..adef3b49d13 100644 --- a/src/server/authserver/Server/BattlenetManager.h +++ b/src/server/authserver/Server/BattlenetManager.h @@ -19,7 +19,6 @@ #define __BATTLENETMANAGER_H__ #include "Define.h" -#include <ace/Singleton.h> #include <string> #include <set> #include <map> @@ -85,17 +84,22 @@ namespace Battlenet class BattlenetMgr { - friend class ACE_Singleton<BattlenetMgr, ACE_Null_Mutex>; BattlenetMgr() { } ~BattlenetMgr(); public: void Load(); bool HasComponent(Battlenet::Component const* component) const; - bool HasProgram(std::string const& program) const { return _programs.count(program); } - bool HasPlatform(std::string const& platform) const { return _platforms.count(platform); } + bool HasProgram(std::string const& program) const { return _programs.count(program) != 0; } + bool HasPlatform(std::string const& platform) const { return _platforms.count(platform) != 0; } Battlenet::ModuleInfo* CreateModule(std::string const& os, std::string const& name) const; + static BattlenetMgr* instance() + { + static BattlenetMgr instance; + return &instance; + } + private: void LoadComponents(); void LoadModules(); @@ -106,6 +110,6 @@ private: std::map<Battlenet::ModuleKey, Battlenet::ModuleInfo*> _modules; }; -#define sBattlenetMgr ACE_Singleton<BattlenetMgr, ACE_Null_Mutex>::instance() +#define sBattlenetMgr BattlenetMgr::instance() #endif // __BATTLENETMANAGER_H__ |
