diff options
author | Max Horn | 2008-08-27 20:41:28 +0000 |
---|---|---|
committer | Max Horn | 2008-08-27 20:41:28 +0000 |
commit | e5f58ef5bff297cb6172d30725a5e7d63c5be0d2 (patch) | |
tree | 25d24a0ea3b5ea1a868b470e2f770c156e7046e8 /common/config-file.cpp | |
parent | cb21c25e417bb546f6678ab9da7440c6e1b4b2fd (diff) | |
download | scummvm-rg350-e5f58ef5bff297cb6172d30725a5e7d63c5be0d2.tar.gz scummvm-rg350-e5f58ef5bff297cb6172d30725a5e7d63c5be0d2.tar.bz2 scummvm-rg350-e5f58ef5bff297cb6172d30725a5e7d63c5be0d2.zip |
Removed various uses of scumm_stricmp by the more readable String::equalsIgnoreCase and String:: compareToIgnoreCase
svn-id: r34198
Diffstat (limited to 'common/config-file.cpp')
-rw-r--r-- | common/config-file.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/config-file.cpp b/common/config-file.cpp index 9f54c9ddde..42d67109fa 100644 --- a/common/config-file.cpp +++ b/common/config-file.cpp @@ -225,7 +225,7 @@ bool ConfigFile::saveToStream(WriteStream &stream) { void ConfigFile::removeSection(const String §ion) { assert(isValidName(section)); for (List<Section>::iterator i = _sections.begin(); i != _sections.end(); ++i) { - if (!scumm_stricmp(section.c_str(), i->name.c_str())) { + if (section.equalsIgnoreCase(i->name)) { _sections.erase(i); return; } @@ -318,7 +318,7 @@ const ConfigFile::SectionKeyList ConfigFile::getKeys(const String §ion) cons ConfigFile::Section *ConfigFile::getSection(const String §ion) { for (List<Section>::iterator i = _sections.begin(); i != _sections.end(); ++i) { - if (!scumm_stricmp(section.c_str(), i->name.c_str())) { + if (section.equalsIgnoreCase(i->name)) { return &(*i); } } @@ -327,7 +327,7 @@ ConfigFile::Section *ConfigFile::getSection(const String §ion) { const ConfigFile::Section *ConfigFile::getSection(const String §ion) const { for (List<Section>::const_iterator i = _sections.begin(); i != _sections.end(); ++i) { - if (!scumm_stricmp(section.c_str(), i->name.c_str())) { + if (section.equalsIgnoreCase(i->name)) { return &(*i); } } @@ -340,7 +340,7 @@ bool ConfigFile::Section::hasKey(const String &key) const { const ConfigFile::KeyValue* ConfigFile::Section::getKey(const String &key) const { for (List<KeyValue>::const_iterator i = keys.begin(); i != keys.end(); ++i) { - if (!scumm_stricmp(key.c_str(), i->key.c_str())) { + if (key.equalsIgnoreCase(i->key)) { return &(*i); } } @@ -349,7 +349,7 @@ const ConfigFile::KeyValue* ConfigFile::Section::getKey(const String &key) const void ConfigFile::Section::setKey(const String &key, const String &value) { for (List<KeyValue>::iterator i = keys.begin(); i != keys.end(); ++i) { - if (!scumm_stricmp(key.c_str(), i->key.c_str())) { + if (key.equalsIgnoreCase(i->key)) { i->value = value; return; } @@ -363,7 +363,7 @@ void ConfigFile::Section::setKey(const String &key, const String &value) { void ConfigFile::Section::removeKey(const String &key) { for (List<KeyValue>::iterator i = keys.begin(); i != keys.end(); ++i) { - if (!scumm_stricmp(key.c_str(), i->key.c_str())) { + if (key.equalsIgnoreCase(i->key)) { keys.erase(i); return; } |