aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Support
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-03-11 17:11:05 +0100
committerNaios <naios-dev@live.de>2016-03-11 18:35:49 +0100
commit329225b40d110bed634f8cd0a1ab5c6dc7bbbdd1 (patch)
tree5cf3f149429e6821660cdc9c04ef3210ac374e4b /src/server/game/Support
parenta8fe7f6eb7195368bbb4d0256927405f5e5c6f87 (diff)
Core/Game: Move singleton instances into compilation units
* Fixes issues when building shared libraries (prevents gcc and clang from providing several instance)
Diffstat (limited to 'src/server/game/Support')
-rw-r--r--src/server/game/Support/SupportMgr.cpp6
-rw-r--r--src/server/game/Support/SupportMgr.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/server/game/Support/SupportMgr.cpp b/src/server/game/Support/SupportMgr.cpp
index 7caccfd7cb2..142904fcae3 100644
--- a/src/server/game/Support/SupportMgr.cpp
+++ b/src/server/game/Support/SupportMgr.cpp
@@ -362,6 +362,12 @@ SupportMgr::~SupportMgr()
delete s.second;
}
+SupportMgr* SupportMgr::instance()
+{
+ static SupportMgr instance;
+ return &instance;
+}
+
void SupportMgr::Initialize()
{
SetSupportSystemStatus(sWorld->getBoolConfig(CONFIG_SUPPORT_ENABLED));
diff --git a/src/server/game/Support/SupportMgr.h b/src/server/game/Support/SupportMgr.h
index f79f71e7b2f..86f5b223a86 100644
--- a/src/server/game/Support/SupportMgr.h
+++ b/src/server/game/Support/SupportMgr.h
@@ -211,11 +211,7 @@ private:
~SupportMgr();
public:
- static SupportMgr* instance()
- {
- static SupportMgr instance;
- return &instance;
- }
+ static SupportMgr* instance();
template<typename T>
T* GetTicket(uint32 ticketId);