summaryrefslogtreecommitdiff
path: root/src/mmo/config_parse.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:02:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:32:36 -0700
commit56e149a51562b9d2620bc9037a81735c29ea95af (patch)
tree3a4bd218f69c5cbfec0dd8dcada34413c0ddc715 /src/mmo/config_parse.cpp
parent1a1bfc8fd8a3613bf7d3c320dcaff29a9402f50c (diff)
downloadtmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.gz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.bz2
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.xz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.zip
Ditch gcc 4.6 support
Diffstat (limited to 'src/mmo/config_parse.cpp')
-rw-r--r--src/mmo/config_parse.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mmo/config_parse.cpp b/src/mmo/config_parse.cpp
index b954e8b..a6dfd6e 100644
--- a/src/mmo/config_parse.cpp
+++ b/src/mmo/config_parse.cpp
@@ -30,7 +30,7 @@
bool is_comment(XString line)
{
- return not line or line.startswith("//");
+ return not line or line.startswith("//"_s);
}
template<class ZS>
@@ -72,7 +72,7 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
io::LineReader in(filename);
if (!in.is_open())
{
- PRINTF("Unable to open file: %s\n", filename);
+ PRINTF("Unable to open file: %s\n"_fmt, filename);
return false;
}
io::Line line;
@@ -85,16 +85,16 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
ZString value;
if (!config_split(line.text, &key, &value))
{
- line.error("Bad config line");
+ line.error("Bad config line"_s);
rv = false;
continue;
}
- if (key == "import")
+ if (key == "import"_s)
{
rv &= load_config_file(value, slave);
continue;
}
- else if (key == "version-lt")
+ else if (key == "version-lt"_s)
{
Version vers;
if (!extract(value, &vers))
@@ -106,7 +106,7 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
continue;
break;
}
- else if (key == "version-le")
+ else if (key == "version-le"_s)
{
Version vers;
if (!extract(value, &vers))
@@ -118,7 +118,7 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
continue;
break;
}
- else if (key == "version-gt")
+ else if (key == "version-gt"_s)
{
Version vers;
if (!extract(value, &vers))
@@ -130,7 +130,7 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
continue;
break;
}
- else if (key == "version-ge")
+ else if (key == "version-ge"_s)
{
Version vers;
if (!extract(value, &vers))
@@ -144,7 +144,7 @@ bool load_config_file(ZString filename, ConfigItemParser slave)
}
else if (!slave(key, value))
{
- line.error("Bad config key or value");
+ line.error("Bad config key or value"_s);
rv = false;
continue;
}