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/settings_internal.h | |
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/settings_internal.h')
-rw-r--r-- | src/settings_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h index f92480a76..fca85de0c 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -107,6 +107,8 @@ struct SettingDesc : SettingDescBase { SettingType GetType() const; }; +typedef std::initializer_list<const SettingDesc> SettingTable; + const SettingDesc *GetSettingFromName(const char *name); bool SetSettingValue(const SettingDesc *sd, int32 value, bool force_newgame = false); bool SetSettingValue(const SettingDesc *sd, const char *value, bool force_newgame = false); |