diff options
author | Max Horn | 2007-01-21 00:29:03 +0000 |
---|---|---|
committer | Max Horn | 2007-01-21 00:29:03 +0000 |
commit | f30f00aedc2a1be8c355192f5270c0af08d8cca6 (patch) | |
tree | ca61397f28b883875e9d003a724af0e94166b5bc /base/game.cpp | |
parent | baaedb16510a1fef3d0f70b269ce0b8fd24996b1 (diff) | |
download | scummvm-rg350-f30f00aedc2a1be8c355192f5270c0af08d8cca6.tar.gz scummvm-rg350-f30f00aedc2a1be8c355192f5270c0af08d8cca6.tar.bz2 scummvm-rg350-f30f00aedc2a1be8c355192f5270c0af08d8cca6.zip |
Make use of HashMap::getVal/setVal, and some cleanup
svn-id: r25138
Diffstat (limited to 'base/game.cpp')
-rw-r--r-- | base/game.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/game.cpp b/base/game.cpp index b5a381f10f..a20acaae95 100644 --- a/base/game.cpp +++ b/base/game.cpp @@ -28,21 +28,21 @@ void GameDescriptor::updateDesc(const char *extra) { // TODO: The format used here (LANG/PLATFORM/EXTRA) is not set in stone. // We may want to change the order (PLATFORM/EXTRA/LANG, anybody?), or // the seperator (instead of '/' use ', ' or ' '). - const bool hasCustomLanguage = (this->contains("language") && (this->language() != Common::UNK_LANG)); - const bool hasCustomPlatform = (this->contains("platform") && (this->platform() != Common::kPlatformUnknown)); + const bool hasCustomLanguage = (language() != Common::UNK_LANG); + const bool hasCustomPlatform = (platform() != Common::kPlatformUnknown); const bool hasExtraDesc = (extra && extra[0]); // Adapt the description string if custom platform/language is set. if (hasCustomLanguage || hasCustomPlatform || hasExtraDesc) { - Common::String descr = this->description(); + Common::String descr = description(); descr += " ("; if (hasCustomLanguage) - descr += Common::getLanguageDescription(this->language()); + descr += Common::getLanguageDescription(language()); if (hasCustomPlatform) { if (hasCustomLanguage) descr += "/"; - descr += Common::getPlatformDescription(this->platform()); + descr += Common::getPlatformDescription(platform()); } if (hasExtraDesc) { if (hasCustomPlatform || hasCustomLanguage) @@ -50,7 +50,7 @@ void GameDescriptor::updateDesc(const char *extra) { descr += extra; } descr += ")"; - this->operator []("description") = descr; + setVal("description", descr); } } |