Config: Make Load() and Save() slightly faster

Only invoke config changed callbacks from Config::Save, not
Layer::Save. The latter results in callbacks being called
once per layer, up to 7 times per save.
This commit is contained in:
Léo Lam
2017-08-04 23:43:52 +08:00
parent da03ff2e25
commit 93f49b1ca4
2 changed files with 2 additions and 2 deletions

View File

@ -62,12 +62,14 @@ void Load()
{
for (auto& layer : s_layers)
layer.second->Load();
InvokeConfigChangedCallbacks();
}
void Save()
{
for (auto& layer : s_layers)
layer.second->Save();
InvokeConfigChangedCallbacks();
}
void Init()