diff options
author | Peter Powell <petpow@saberuk.com> | 2018-07-24 18:29:43 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-07-24 21:55:10 +0100 |
commit | 97a1d6429a735eb279496df010d04e3f42aa4e22 (patch) | |
tree | a201d8ffe678e5929a2b1d373eef8082d8c6150d /src/configparser.cpp | |
parent | 7a24867d97c6ffe75b155d96dedb11b30b904a33 (diff) |
Make more config stuff case insensitive.
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r-- | src/configparser.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index 627cd78e1..825053044 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -213,25 +213,25 @@ struct Parser mandatory_tag.clear(); } - if (name == "include") + if (stdalgo::string::equalsci(name, "include")) { stack.DoInclude(tag, flags); } - else if (name == "files") + else if (stdalgo::string::equalsci(name, "files")) { for(ConfigItems::iterator i = items->begin(); i != items->end(); i++) { stack.DoReadFile(i->first, i->second, flags, false); } } - else if (name == "execfiles") + else if (stdalgo::string::equalsci(name, "execfiles")) { for(ConfigItems::iterator i = items->begin(); i != items->end(); i++) { stack.DoReadFile(i->first, i->second, flags, true); } } - else if (name == "define") + else if (stdalgo::string::equalsci(name, "define")) { if (flags & FLAG_USE_COMPAT) throw CoreException("<define> tags may only be used in XML-style config (add <config format=\"xml\">)"); @@ -241,12 +241,12 @@ struct Parser throw CoreException("Variable definition must include variable name"); stack.vars[varname] = value; } - else if (name == "config") + else if (stdalgo::string::equalsci(name, "config")) { std::string format = tag->getString("format"); - if (format == "xml") + if (stdalgo::string::equalsci(format, "xml")) flags &= ~FLAG_USE_COMPAT; - else if (format == "compat") + else if (stdalgo::string::equalsci(format, "compat")) flags |= FLAG_USE_COMPAT; else if (!format.empty()) throw CoreException("Unknown configuration format " + format); |