summaryrefslogtreecommitdiff
path: root/src/settings_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings_internal.h')
-rw-r--r--src/settings_internal.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h
index fca85de0c..4aebe6b79 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -82,7 +82,7 @@ typedef bool OnChange(int32 var); ///< callback prototype on data modi
typedef size_t OnConvert(const char *value); ///< callback prototype for conversion error
/** Properties of config file settings. */
-struct SettingDescBase {
+struct SettingDesc {
const char *name; ///< name of the setting. Used in configuration file and for console
const void *def; ///< default value given when none is present
SettingDescType cmd; ///< various flags for the variable
@@ -98,16 +98,13 @@ struct SettingDescBase {
OnConvert *proc_cnvt; ///< callback procedure when loading value mechanism fails
SettingCategory cat; ///< assigned categories of the setting
bool startup; ///< setting has to be loaded directly at startup?
-};
-
-struct SettingDesc : SettingDescBase {
SaveLoad save; ///< Internal structure (going to savegame, parts to config)
bool IsEditable(bool do_command = false) const;
SettingType GetType() const;
};
-typedef std::initializer_list<const SettingDesc> SettingTable;
+typedef std::initializer_list<std::unique_ptr<const SettingDesc>> SettingTable;
const SettingDesc *GetSettingFromName(const char *name);
bool SetSettingValue(const SettingDesc *sd, int32 value, bool force_newgame = false);