diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-21 04:32:13 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 10:56:55 -0400 |
commit | 7f708e8d77fb6237407f49246622dbe1b445d536 (patch) | |
tree | 454602f59a51763b12e4952046fbd0bdf47bd4ec /src/common/settings_common.h | |
parent | d1de1c3bedcd2526eb78c7eaa21f2eef6041a590 (diff) |
settings: Define paired settings
settings_common: Remove unused optional
Diffstat (limited to 'src/common/settings_common.h')
-rw-r--r-- | src/common/settings_common.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 664c807f1..ad005ca4e 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -75,7 +75,8 @@ public: class BasicSetting { protected: explicit BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, - bool save_, bool runtime_modifiable_, Specialization spec); + bool save_, bool runtime_modifiable_, Specialization spec, + BasicSetting* other_setting); public: virtual ~BasicSetting(); @@ -197,6 +198,11 @@ public: [[nodiscard]] enum Specialization Specialization() const; /** + * @returns Another BasicSetting if one is paired, or nullptr otherwise. + */ + [[nodiscard]] BasicSetting* PairedSetting() const; + + /** * Returns the label this setting was created with. * * @returns A reference to the label @@ -236,7 +242,8 @@ private: const bool runtime_modifiable; ///< Suggests if the setting can be modified while a guest is running const enum Specialization - specialization; ///< Extra data to identify representation of a setting + specialization; ///< Extra data to identify representation of a setting + BasicSetting* const other_setting; ///< A paired setting }; } // namespace Settings |