diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-14 11:02:47 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-14 11:32:36 -0700 |
commit | 56e149a51562b9d2620bc9037a81735c29ea95af (patch) | |
tree | 3a4bd218f69c5cbfec0dd8dcada34413c0ddc715 /src/mmo/human_time_diff.hpp | |
parent | 1a1bfc8fd8a3613bf7d3c320dcaff29a9402f50c (diff) | |
download | tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.gz tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.bz2 tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.xz tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.zip |
Ditch gcc 4.6 support
Diffstat (limited to 'src/mmo/human_time_diff.hpp')
-rw-r--r-- | src/mmo/human_time_diff.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mmo/human_time_diff.hpp b/src/mmo/human_time_diff.hpp index 689b8d9..aace438 100644 --- a/src/mmo/human_time_diff.hpp +++ b/src/mmo/human_time_diff.hpp @@ -61,21 +61,21 @@ bool extract(XString str, HumanTimeDiff *iv) str = str.xislice_t(it2); short *ptr = nullptr; - if (suffix == "y" || suffix == "a") + if (suffix == "y"_s || suffix == "a"_s) ptr = &iv->year; - else if (suffix == "m") + else if (suffix == "m"_s) ptr = &iv->month; - else if (suffix == "j" || suffix == "d") + else if (suffix == "j"_s || suffix == "d"_s) ptr = &iv->day; - else if (suffix == "h") + else if (suffix == "h"_s) ptr = &iv->hour; - else if (suffix == "mn") + else if (suffix == "mn"_s) ptr = &iv->minute; - else if (suffix == "s") + else if (suffix == "s"_s) ptr = &iv->second; else return false; - if (number.startswith('+') && !number.startswith("+-")) + if (number.startswith('+') && !number.startswith("+-"_s)) number = number.xslice_t(1); if (*ptr || !extract(number, ptr)) return false; |