mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Config: Fix template deduction for implicit conversions
This excludes the second argument from template deduction. Otherwise, it is required to manually cast the second argument to the ConfigInfo type (because implicit conversions won't work). e.g. to set the value for a ConfigInfo<std::string> from a string literal, you'd need a ugly `std::string("yourstring")`.
This commit is contained in:
@ -169,8 +169,11 @@ void LogManager::SaveSettings()
|
||||
Config::SetBaseOrCurrent(LOGGER_VERBOSITY, static_cast<int>(GetLogLevel()));
|
||||
|
||||
for (const auto& container : m_log)
|
||||
Config::SetBaseOrCurrent({{Config::System::Logger, "Logs", container.m_short_name}, false},
|
||||
container.m_enable);
|
||||
{
|
||||
const Config::ConfigInfo<bool> info{{Config::System::Logger, "Logs", container.m_short_name},
|
||||
false};
|
||||
Config::SetBaseOrCurrent(info, container.m_enable);
|
||||
}
|
||||
|
||||
Config::Save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user