diff options
author | rubidium42 <rubidium@openttd.org> | 2021-04-28 16:46:24 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-13 23:13:17 +0200 |
commit | 65cbde4b30f8fdf6d4cf1196f6a596a5550c9aee (patch) | |
tree | 180f29871d8401d18dce5ae92f196832b34fe0bc /src/settings_gui.cpp | |
parent | 2022e3482417eceeb1045d01c2aa64db42f03f08 (diff) | |
download | openttd-65cbde4b30f8fdf6d4cf1196f6a596a5550c9aee.tar.xz |
Codechange: move currency settings to std::string
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 15c6a887e..664cfbd21 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2668,7 +2668,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_SEPARATOR: SetDParamStr(0, _custom_currency.separator); str = STR_JUST_RAW_STRING; - len = sizeof(_custom_currency.separator) - 1; // Number of characters excluding '\0' termination + len = 7; line = WID_CC_SEPARATOR; break; @@ -2676,7 +2676,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_PREFIX: SetDParamStr(0, _custom_currency.prefix); str = STR_JUST_RAW_STRING; - len = sizeof(_custom_currency.prefix) - 1; // Number of characters excluding '\0' termination + len = 15; line = WID_CC_PREFIX; break; @@ -2684,7 +2684,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_SUFFIX: SetDParamStr(0, _custom_currency.suffix); str = STR_JUST_RAW_STRING; - len = sizeof(_custom_currency.suffix) - 1; // Number of characters excluding '\0' termination + len = 15; line = WID_CC_SUFFIX; break; @@ -2728,15 +2728,15 @@ struct CustomCurrencyWindow : Window { break; case WID_CC_SEPARATOR: // Thousands separator - strecpy(_custom_currency.separator, str, lastof(_custom_currency.separator)); + _custom_currency.separator = str; break; case WID_CC_PREFIX: - strecpy(_custom_currency.prefix, str, lastof(_custom_currency.prefix)); + _custom_currency.prefix = str; break; case WID_CC_SUFFIX: - strecpy(_custom_currency.suffix, str, lastof(_custom_currency.suffix)); + _custom_currency.suffix = str; break; case WID_CC_YEAR: { // Year to switch to euro |