From f30f00aedc2a1be8c355192f5270c0af08d8cca6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 21 Jan 2007 00:29:03 +0000 Subject: Make use of HashMap::getVal/setVal, and some cleanup svn-id: r25138 --- base/game.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'base/game.cpp') 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); } } -- cgit v1.2.3