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.
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user