Core/Common: Move singleton instances into compilation units

* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)

(cherry picked from commit 5c91586797)
This commit is contained in:
Naios
2016-03-11 18:55:33 +01:00
parent d1efa0b8b1
commit 998607b106
6 changed files with 17 additions and 12 deletions

View File

@@ -56,6 +56,12 @@ bool ConfigMgr::LoadInitial(std::string const& file, std::string& error)
return true;
}
ConfigMgr* ConfigMgr::instance()
{
static ConfigMgr instance;
return &instance;
}
bool ConfigMgr::Reload(std::string& error)
{
return LoadInitial(_filename, error);