diff options
author | Bastien Bouclet | 2018-05-10 09:26:26 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-05-10 09:26:26 +0200 |
commit | 1dcb8076db64420ab28722a73583f89b38314e71 (patch) | |
tree | 84b14cadcdc06c9fcb161a1f81b3918f2b5b6729 /base | |
parent | 2fe060e5c9491ddd7c8f639aab5d7c58c7c73092 (diff) | |
download | scummvm-rg350-1dcb8076db64420ab28722a73583f89b38314e71.tar.gz scummvm-rg350-1dcb8076db64420ab28722a73583f89b38314e71.tar.bz2 scummvm-rg350-1dcb8076db64420ab28722a73583f89b38314e71.zip |
ENGINES: Remove usage of C++11 extended initializer lists
Diffstat (limited to 'base')
-rw-r--r-- | base/plugins.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp index 40a4d77053..023f2f3bb3 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -459,11 +459,9 @@ DECLARE_SINGLETON(EngineManager); * and only if we can't find it there, we loop through the plugins. **/ PlainGameDescriptor EngineManager::findGame(const Common::String &gameName, const Plugin **plugin) const { - PlainGameDescriptor result; - // First look for the game using the plugins in memory. This is critical // for calls coming from inside games - result = findGameInLoadedPlugins(gameName, plugin); + PlainGameDescriptor result = findGameInLoadedPlugins(gameName, plugin); if (result.gameId) { return result; } @@ -497,7 +495,6 @@ PlainGameDescriptor EngineManager::findGame(const Common::String &gameName, cons PlainGameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String &gameName, const Plugin **plugin) const { // Find the GameDescriptor for this target const PluginList &plugins = getPlugins(); - PlainGameDescriptor result; if (plugin) *plugin = 0; @@ -505,14 +502,15 @@ PlainGameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String PluginList::const_iterator iter; for (iter = plugins.begin(); iter != plugins.end(); ++iter) { - result = (*iter)->get<MetaEngine>().findGame(gameName.c_str()); - if (result.gameId) { + PlainGameDescriptor pgd = (*iter)->get<MetaEngine>().findGame(gameName.c_str()); + if (pgd.gameId) { if (plugin) *plugin = *iter; - return result; + return pgd; } } - return result; + + return PlainGameDescriptor::empty(); } DetectionResults EngineManager::detectGames(const Common::FSList &fslist) const { |