diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-08-04 23:43:52 +0800 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2018-05-23 16:07:18 +0200 |
| commit | 93f49b1ca4526b7e5d8fc3ba647347b1e0b9ef40 (patch) | |
| tree | beb54c4873405882f4638fc2029922d51c980c9e /Source/Core/Common/Config/Config.cpp | |
| parent | da03ff2e257ea98cedfc438390bf9a2aa1e2c62d (diff) | |
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.
Diffstat (limited to 'Source/Core/Common/Config/Config.cpp')
| -rw-r--r-- | Source/Core/Common/Config/Config.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp index 7e1fc904d9..30215aec06 100644 --- a/Source/Core/Common/Config/Config.cpp +++ b/Source/Core/Common/Config/Config.cpp @@ -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() |
