diff options
author | Chris Apers | 2005-10-08 19:10:05 +0000 |
---|---|---|
committer | Chris Apers | 2005-10-08 19:10:05 +0000 |
commit | 8b4f59dc7a0021ec37a26225b6e39e98e7adaa94 (patch) | |
tree | 364ea441a96de55cf58673ba1a7d5b29dd63051f /common | |
parent | 12f40ae7776ff6204212c91e819951d5ff4eec66 (diff) | |
download | scummvm-rg350-8b4f59dc7a0021ec37a26225b6e39e98e7adaa94.tar.gz scummvm-rg350-8b4f59dc7a0021ec37a26225b6e39e98e7adaa94.tar.bz2 scummvm-rg350-8b4f59dc7a0021ec37a26225b6e39e98e7adaa94.zip |
PalmOS:
- fix crash trying to use emptyString
- debug option
svn-id: r18963
Diffstat (limited to 'common')
-rw-r--r-- | common/config-manager.cpp | 10 | ||||
-rw-r--r-- | common/config-manager.h | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 9302b6d680..6813a12d7e 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -62,7 +62,7 @@ static bool isValidDomainName(const Common::String &domain) { namespace Common { -#ifndef PALMOS_ARM +#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG)) const String ConfigManager::kApplicationDomain("scummvm"); const String ConfigManager::kTransientDomain("__TRANSIENT"); @@ -112,6 +112,7 @@ void ConfigManager::loadDefaultConfigFile() { strcpy(configFile, DEFAULT_CONFIG_FILE); #endif #endif + loadConfigFile(configFile); } @@ -205,7 +206,7 @@ void ConfigManager::loadFile(const String &filename) { String key = rtrim(t); String value = ltrim(p + 1); set(key, value, domain); - +//printf("key : %s | %s\n"); // Store comment if (_globalDomains.contains(domain)) { _globalDomains[domain].setKVComment(key, comment); @@ -356,7 +357,6 @@ const String & ConfigManager::get(const String &key, const String &domain) const // 3) All global domains // 4) The defaults - if ((domain.isEmpty() || domain == kTransientDomain) && _transientDomain.contains(key)) return _transientDomain[key]; @@ -513,7 +513,11 @@ bool ConfigManager::hasGameDomain(const String &domain) const { const String &ConfigManager::Domain::get(const String &key) const { Node *node = findNode(_root, key); +#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG)) return node ? node->_value : String::emptyString; +#else + return node ? node->_value : ConfMan._emptyString; +#endif } void ConfigManager::Domain::setDomainComment(const String &comment) { diff --git a/common/config-manager.h b/common/config-manager.h index df91781e19..196160a054 100644 --- a/common/config-manager.h +++ b/common/config-manager.h @@ -67,7 +67,7 @@ public: typedef Map<String, Domain, IgnoreCaseComparator> DomainMap; -#ifndef PALMOS_ARM +#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG)) /** The name of the application domain (normally 'scummvm'). */ static const String kApplicationDomain; @@ -76,6 +76,8 @@ public: #else static const char *kApplicationDomain; static const char *kTransientDomain; + + const String _emptyString; #endif void loadDefaultConfigFile(); |