From 195aed22b5df49a20b3cd00f22ba7102d345f9f1 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 5 Oct 2021 21:35:41 +0200 Subject: [PATCH] Optimize `Asset::onAssetLoaded` if even is unused --- Source/Engine/Content/Asset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Content/Asset.cpp b/Source/Engine/Content/Asset.cpp index 9a68d6a17..45dd1c626 100644 --- a/Source/Engine/Content/Asset.cpp +++ b/Source/Engine/Content/Asset.cpp @@ -516,7 +516,7 @@ void Asset::onLoaded() { onLoaded_MainThread(); } - else + else if (OnLoaded.IsBinded()) { Function action; action.Bind(this);