diff options
author | Max Horn | 2010-03-29 20:31:23 +0000 |
---|---|---|
committer | Max Horn | 2010-03-29 20:31:23 +0000 |
commit | 4bac9e1b752e92318ff1d5497ec1d7aa0f2786be (patch) | |
tree | 51a91527e39d3cca88a45e26afa60d79639a6b29 /base | |
parent | 2872f197d81df8a804546207dc8388d7f4f87997 (diff) | |
download | scummvm-rg350-4bac9e1b752e92318ff1d5497ec1d7aa0f2786be.tar.gz scummvm-rg350-4bac9e1b752e92318ff1d5497ec1d7aa0f2786be.tar.bz2 scummvm-rg350-4bac9e1b752e92318ff1d5497ec1d7aa0f2786be.zip |
COMMON: Cleanup ConfigManager code
* get rid of ConfigManager::_emptyString
* get rid of ConfigManager::Domain::get (use getVal instead)
* remove some dead code
svn-id: r48417
Diffstat (limited to 'base')
-rw-r--r-- | base/commandLine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index caefd6e8fe..8846f4bcc6 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -584,7 +584,7 @@ static void listTargets() { ConfigManager::DomainMap::const_iterator iter; for (iter = domains.begin(); iter != domains.end(); ++iter) { Common::String name(iter->_key); - Common::String description(iter->_value.get("description")); + Common::String description(iter->_value.getVal("description")); if (description.empty()) { // FIXME: At this point, we should check for a "gameid" override @@ -617,7 +617,7 @@ static void listSaves(const char *target) { // Grab the gameid from the domain resp. use the target as gameid Common::String gameid; if (domain) - gameid = domain->get("gameid"); + gameid = domain->getVal("gameid"); if (gameid.empty()) gameid = target; gameid.toLowercase(); // Normalize it to lower case @@ -674,8 +674,8 @@ static void runDetectorTest() { int success = 0, failure = 0; for (iter = domains.begin(); iter != domains.end(); ++iter) { Common::String name(iter->_key); - Common::String gameid(iter->_value.get("gameid")); - Common::String path(iter->_value.get("path")); + Common::String gameid(iter->_value.getVal("gameid")); + Common::String path(iter->_value.getVal("path")); printf("Looking at target '%s', gameid '%s', path '%s' ...\n", name.c_str(), gameid.c_str(), path.c_str()); if (path.empty()) { @@ -748,8 +748,8 @@ void upgradeTargets() { for (iter = domains.begin(); iter != domains.end(); ++iter) { Common::ConfigManager::Domain &dom = iter->_value; Common::String name(iter->_key); - Common::String gameid(dom.get("gameid")); - Common::String path(dom.get("path")); + Common::String gameid(dom.getVal("gameid")); + Common::String path(dom.getVal("path")); printf("Looking at target '%s', gameid '%s' ...\n", name.c_str(), gameid.c_str()); if (path.empty()) { @@ -768,9 +768,9 @@ void upgradeTargets() { continue; } - Common::Language lang = Common::parseLanguage(dom.get("language")); - Common::Platform plat = Common::parsePlatform(dom.get("platform")); - Common::String desc(dom.get("description")); + Common::Language lang = Common::parseLanguage(dom.getVal("language")); + Common::Platform plat = Common::parsePlatform(dom.getVal("platform")); + Common::String desc(dom.getVal("description")); GameList candidates(EngineMan.detectGames(files)); GameDescriptor *g = 0; |