aboutsummaryrefslogtreecommitdiff
path: root/common/config-file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/config-file.cpp')
-rw-r--r--common/config-file.cpp12
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 &section) {
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 &section) cons
ConfigFile::Section *ConfigFile::getSection(const String &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)) {
return &(*i);
}
}
@@ -327,7 +327,7 @@ ConfigFile::Section *ConfigFile::getSection(const String &section) {
const ConfigFile::Section *ConfigFile::getSection(const String &section) 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;
}