aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server/BattlenetManager.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-07-19 17:03:32 +0200
committerShauren <shauren.trinity@gmail.com>2014-07-19 17:03:32 +0200
commit0bcc92d90020d0c4f7d3086189cc94e4990517b1 (patch)
tree52453e9b1ed9efe2edca7c61ee771cc8d30a29a4 /src/server/authserver/Server/BattlenetManager.h
parent2452cfb98ecdc18bd64a118410d2a6dc9505f0c4 (diff)
Part 3: Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/authserver/Server/BattlenetManager.h')
-rw-r--r--src/server/authserver/Server/BattlenetManager.h14
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__