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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user