Codechange: move locale settings to std::string

This commit is contained in:
rubidium42
2021-04-28 16:30:49 +02:00
committed by rubidium42
parent 16437b7c0d
commit 2022e34824
4 changed files with 53 additions and 50 deletions

View File

@@ -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)

View File

@@ -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