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:
@@ -9,14 +9,13 @@
|
||||
#if defined(_WIN32) && !defined(DEDICATED)
|
||||
extern bool _window_maximize;
|
||||
|
||||
static const SettingDesc _win32_settings[] = {
|
||||
static const SettingTable _win32_settings{
|
||||
[post-amble]
|
||||
};
|
||||
#endif /* _WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_END = SDTG_END()
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -42,6 +41,3 @@ name = ""window_maximize""
|
||||
var = _window_maximize
|
||||
def = false
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_END]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user