diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-22 20:44:09 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-27 18:49:43 +0200 |
commit | be28c95b30eb433de5e7b9831657af551ef236f9 (patch) | |
tree | ba8622ee7ab429846eda884c33fe3635249d66e7 /src/settings_internal.h | |
parent | 024e584904bc9ee4ac63a8c84fa37a065974fcdc (diff) | |
download | openttd-be28c95b30eb433de5e7b9831657af551ef236f9.tar.xz |
Codechange: make Write_ValidateSetting a function of IntSettingDesc
Diffstat (limited to 'src/settings_internal.h')
-rw-r--r-- | src/settings_internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h index ee8b59be1..7b37ac267 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -110,6 +110,8 @@ struct SettingDesc { bool IsEditable(bool do_command = false) const; SettingType GetType() const; + bool IsIntSetting() const; + const struct IntSettingDesc *AsIntSetting() const; /** * Format the value of the setting associated with this object. @@ -129,6 +131,9 @@ struct IntSettingDesc : SettingDesc { proc, many_cnvt, cat, startup) {} virtual ~IntSettingDesc() {} + void ChangeValue(const void *object, int32 newvalue) const; + void Write_ValidateSetting(const void *object, int32 value) const; + void FormatValue(char *buf, const char *last, const void *object) const override; }; |