diff options
| author | bunnei <bunneidev@gmail.com> | 2022-07-16 15:32:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-16 15:32:52 -0700 |
| commit | 7d66f8339e4243c74c54b43cfbc3e944fbecb3e8 (patch) | |
| tree | 87768226bd5f30bc8b980eb07ef6f94b6878c5c5 /src/yuzu_cmd | |
| parent | b8813edc51e6bffb8c7e724d848ab45887a93687 (diff) | |
| parent | 99fbdaf75b18dd4cdaad1e93fa2a4ad82b0591aa (diff) | |
Merge pull request #8593 from merryhime/ranged-setting-T
common/setting: Make ranged a property of the type
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.h | 4 |
2 files changed, 4 insertions, 4 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 setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); } -template <typename Type> -void Config::ReadSetting(const std::string& group, Settings::Setting<Type>& setting) { +template <typename Type, bool ranged> +void Config::ReadSetting(const std::string& group, Settings::Setting<Type, ranged>& setting) { setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), static_cast<long>(setting.GetDefault()))); } diff --git a/src/yuzu_cmd/config.h b/src/yuzu_cmd/config.h index ccf77d668..32c03075f 100644 --- a/src/yuzu_cmd/config.h +++ b/src/yuzu_cmd/config.h @@ -33,6 +33,6 @@ private: * @param group The name of the INI group * @param setting The yuzu setting to modify */ - template <typename Type> - void ReadSetting(const std::string& group, Settings::Setting<Type>& setting); + template <typename Type, bool ranged> + void ReadSetting(const std::string& group, Settings::Setting<Type, ranged>& setting); }; |
