Add caching to Config::Info

The goal of this change is to make Config::Get(const Info<T>&)
fast so that we can use it in hot paths.
This commit is contained in:
JosJuice
2020-12-05 18:24:41 +01:00
parent 633ab2dd7c
commit d8744e6db8
4 changed files with 110 additions and 14 deletions

View File

@ -86,7 +86,7 @@ template <typename T>
static void Set(jint layer, const Config::Location& location, T value)
{
GetLayer(layer, location)->Set(location, value);
Config::InvokeConfigChangedCallbacks();
Config::OnConfigChanged();
}
#ifdef __cplusplus