diff options
-rw-r--r-- | base/commandLine.cpp | 2 | ||||
-rw-r--r-- | base/game.cpp | 2 | ||||
-rw-r--r-- | base/game.h | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 8b70a8ddb3..06d08d05fa 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -648,7 +648,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) { // whether there is a gameid matching that name. if (!command.empty()) { GameDescriptor gd = Base::findGame(command); - if (ConfMan.hasGameDomain(command) || (gd.contains("gameid") && !gd.gameid().empty())) { + if (ConfMan.hasGameDomain(command) || !gd.gameid().empty()) { ConfMan.setActiveDomain(command); } else { usage("Unrecognized game target '%s'", command.c_str()); diff --git a/base/game.cpp b/base/game.cpp index cc0cb2c846..a20acaae95 100644 --- a/base/game.cpp +++ b/base/game.cpp @@ -68,7 +68,7 @@ GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin) { PluginList::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { result = (*iter)->findGame(gameName.c_str()); - if (result.contains("gameid") && !result["gameid"].empty()) { + if (!result.gameid().empty()) { if (plugin) *plugin = *iter; break; diff --git a/base/game.h b/base/game.h index 99504b276c..8ff8fc8f3d 100644 --- a/base/game.h +++ b/base/game.h @@ -36,7 +36,10 @@ struct PlainGameDescriptor { class GameDescriptor : public Common::StringMap { public: - GameDescriptor() {} + GameDescriptor() { + setVal("gameid", ""); + setVal("description", ""); + } GameDescriptor(const PlainGameDescriptor &pgd) { setVal("gameid", pgd.gameid); |