diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-18 21:01:42 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-27 18:49:43 +0200 |
commit | 3bb6ce8827b71ae1dcfde4a7836fb6c636fb5a67 (patch) | |
tree | 683666e0514c5acc04c698205a088c43afccc2ff /src/table/settings.ini | |
parent | 425d50372fab501acc97981953a6c002c0a750cf (diff) | |
download | openttd-3bb6ce8827b71ae1dcfde4a7836fb6c636fb5a67.tar.xz |
Codechange: use initializer_lists for the settings tables
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
Diffstat (limited to 'src/table/settings.ini')
-rw-r--r-- | src/table/settings.ini | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/table/settings.ini b/src/table/settings.ini index eea30e003..ed07dfb11 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -59,7 +59,7 @@ static bool UpdateClientConfigValues(int32 p1); * assigns its own value. If the setting was company-based, that would mean that * vehicles could decide on different moments that they are heading back to a * service depot, causing desyncs on a massive scale. */ -const SettingDesc _settings[] = { +const SettingTable _settings{ [post-amble] }; [templates] @@ -76,7 +76,6 @@ SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, 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() [validation] SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size"); @@ -4112,6 +4111,3 @@ str = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT strval = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND cat = SC_BASIC - -[SDT_END] - |