diff options
| author | 2022-07-15 18:37:48 +0100 | |
|---|---|---|
| committer | 2022-07-15 18:45:55 +0100 | |
| commit | 99fbdaf75b18dd4cdaad1e93fa2a4ad82b0591aa (patch) | |
| tree | 34f063354ad890efa79b7f4c57a9c36d3ac4cb69 /src/yuzu_cmd/config.cpp | |
| parent | Merge pull request #8587 from merryhime/padding-unused (diff) | |
| download | yuzu-99fbdaf75b18dd4cdaad1e93fa2a4ad82b0591aa.tar.gz yuzu-99fbdaf75b18dd4cdaad1e93fa2a4ad82b0591aa.tar.xz yuzu-99fbdaf75b18dd4cdaad1e93fa2a4ad82b0591aa.zip | |
common/setting: Make ranged a property of the type
- Avoids new GCC 12 warnings when Type is of form std::optional<T>
- Makes more sense this way, because ranged is not a property which would change over time
Diffstat (limited to 'src/yuzu_cmd/config.cpp')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 903e02297..9db7115a2 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -99,8 +99,8 @@ void Config::ReadSetting(const std::string& group, Settings::Setting<bool>& sett | |||
| 99 | setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); | 99 | setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | template <typename Type> | 102 | template <typename Type, bool ranged> |
| 103 | void Config::ReadSetting(const std::string& group, Settings::Setting<Type>& setting) { | 103 | void Config::ReadSetting(const std::string& group, Settings::Setting<Type, ranged>& setting) { |
| 104 | setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), | 104 | setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), |
| 105 | static_cast<long>(setting.GetDefault()))); | 105 | static_cast<long>(setting.GetDefault()))); |
| 106 | } | 106 | } |