settings: Consolidate RangedSetting's with regular ones
The latest git version of GCC has issues with my diamond inheritance shenanigans. Since that's now two compilers that don't like it I thought it'd be best to just axe all of it and just have the two templates like before. This rolls the features of BasicRangedSetting into BasicSetting, and likewise RangedSetting into Setting. It also renames them from BasicSetting and Setting to Setting and SwitchableSetting respectively. Now longer name corresponds to more complex thing.
This commit is contained in:
parent
01bc0c84f0
commit
ca36722a54
8 changed files with 230 additions and 318 deletions
|
@ -90,17 +90,17 @@ static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs>
|
|||
}};
|
||||
|
||||
template <>
|
||||
void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) {
|
||||
void Config::ReadSetting(const std::string& group, Settings::Setting<std::string>& setting) {
|
||||
setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault());
|
||||
}
|
||||
|
||||
template <>
|
||||
void Config::ReadSetting(const std::string& group, Settings::BasicSetting<bool>& setting) {
|
||||
void Config::ReadSetting(const std::string& group, Settings::Setting<bool>& setting) {
|
||||
setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault());
|
||||
}
|
||||
|
||||
template <typename Type>
|
||||
void Config::ReadSetting(const std::string& group, Settings::BasicSetting<Type>& setting) {
|
||||
void Config::ReadSetting(const std::string& group, Settings::Setting<Type>& setting) {
|
||||
setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(),
|
||||
static_cast<long>(setting.GetDefault())));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue