From 0bcc92d90020d0c4f7d3086189cc94e4990517b1 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 19 Jul 2014 17:03:32 +0200 Subject: Part 3: Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4 --- src/server/authserver/Server/BattlenetManager.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/server/authserver/Server/BattlenetManager.h') 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 #include #include #include @@ -85,17 +84,22 @@ namespace Battlenet class BattlenetMgr { - friend class ACE_Singleton; 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 _modules; }; -#define sBattlenetMgr ACE_Singleton::instance() +#define sBattlenetMgr BattlenetMgr::instance() #endif // __BATTLENETMANAGER_H__ -- cgit v1.2.3