diff options
author | rubidium42 <rubidium@openttd.org> | 2021-04-28 16:30:49 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-13 23:13:17 +0200 |
commit | 2022e3482417eceeb1045d01c2aa64db42f03f08 (patch) | |
tree | 2719aa0d92c75ff9418e8a0b64cc89e9b3c437e2 /src/table | |
parent | 16437b7c0dc2cf8c0ab32e375df7b2712feff73d (diff) | |
download | openttd-2022e3482417eceeb1045d01c2aa64db42f03f08.tar.xz |
Codechange: move locale settings to std::string
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/settings.h.preamble | 3 | ||||
-rw-r--r-- | src/table/settings.ini | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble index d0a3dc177..14eeb9fdc 100644 --- a/src/table/settings.h.preamble +++ b/src/table/settings.h.preamble @@ -107,6 +107,9 @@ static size_t ConvertLandscape(const char *value); #define SDT_STR(base, var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat, extra, startup)\ SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, sizeof(((base*)8)->var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, nullptr, from, to, cat, extra, startup) +#define SDT_SSTR(base, var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat, extra, startup)\ + SDT_GENERAL(#var, SDT_STDSTRING, SL_STDSTR, type, flags, guiflags, base, var, sizeof(((base*)8)->var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, nullptr, from, to, cat, extra, startup) + #define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, load, cat, extra, startup)\ SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, load, from, to, cat, extra, startup) diff --git a/src/table/settings.ini b/src/table/settings.ini index 5b639e0de..66dc55e9b 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -73,7 +73,7 @@ SDTC_SSTR = SDTC_SSTR( $var, $type, $flags, $guiflags, $def, SDTC_VAR = SDTC_VAR( $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup), SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup), SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat, $extra, $startup), -SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup), +SDT_SSTR = SDT_SSTR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup), SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup), SDT_NULL = SDT_NULL($length, $from, $to), SDT_END = SDT_END() @@ -2640,7 +2640,7 @@ str = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL -[SDT_STR] +[SDT_SSTR] base = GameSettings var = locale.digit_group_separator type = SLE_STRQ @@ -2650,7 +2650,7 @@ def = nullptr proc = RedrawScreen cat = SC_BASIC -[SDT_STR] +[SDT_SSTR] base = GameSettings var = locale.digit_group_separator_currency type = SLE_STRQ @@ -2660,7 +2660,7 @@ def = nullptr proc = RedrawScreen cat = SC_BASIC -[SDT_STR] +[SDT_SSTR] base = GameSettings var = locale.digit_decimal_separator type = SLE_STRQ |