Store pointers in Config::SYSCONF_SETTINGS

Not strictly necessary, but it reduces memory usage a little,
and the next commit will make copying an Info object slower.
This commit is contained in:
JosJuice
2020-09-20 19:11:20 +02:00
parent b285991b88
commit 633ab2dd7c
4 changed files with 25 additions and 25 deletions

View File

@ -472,11 +472,11 @@ static void RestoreSYSCONF()
for (const auto& setting : Config::SYSCONF_SETTINGS)
{
std::visit(
[&](auto& info) {
[&](auto* info) {
// If this setting was overridden, then we copy the base layer value back to the SYSCONF.
// Otherwise we leave the new value in the SYSCONF.
if (Config::GetActiveLayerForConfig(info) == Config::LayerType::Base)
Config::SetBase(info, temp_layer.Get(info));
if (Config::GetActiveLayerForConfig(*info) == Config::LayerType::Base)
Config::SetBase(*info, temp_layer.Get(*info));
},
setting.config_info);
}