Core/Battle.net: Refactored ModuleInfo creation

This commit is contained in:
Shauren committed 2014-06-01 02:39:55 +02:00
1 parent a860d5ca47
commit db2cb70120
3 files changed
+17 -19

No files matched your search

@@ -87,10 +87,10 @@ bool BattlenetMgr::HasComponent(Battlenet::Component const* component) const
return false;
}
Battlenet::ModuleInfo const* BattlenetMgr::GetModule(Battlenet::ModuleKey const& key) const
Battlenet::ModuleInfo* BattlenetMgr::CreateModule(std::string const& os, std::string const& name) const
{
if (_modules.count(key))
return _modules.at(key);
Battlenet::ModuleKey key { os, name };
ASSERT(_modules.count(key));
return NULL;
return new Battlenet::ModuleInfo(*_modules.at(key));
}