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 | 4ffbd95fa512cab5c348f1c5e33db65351f1be5a (patch) | |
| tree | 454602f59a51763b12e4952046fbd0bdf47bd4ec /src/common/settings_common.h | |
| parent | 5700f46f8f2945e4899b3765ad3fd4ef3b60e244 (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 664c807f1d..ad005ca4e4 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 |
