From 6c86268fdd8aa5fac6891a6c6f344d22518d2d96 Mon Sep 17 00:00:00 2001 From: CrazyRoka Date: Fri, 12 Jul 2024 13:38:41 +0100 Subject: [PATCH] Decorate rare !data.inside_tree condition with unlikely --- scene/main/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/node.h b/scene/main/node.h index d347bda5529..ee195ddef96 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -596,7 +596,7 @@ public: // No thread processing. // Only accessible if node is outside the scene tree // or access will happen from a node-safe thread. - return is_current_thread_safe_for_nodes() || !data.inside_tree; + return is_current_thread_safe_for_nodes() || unlikely(!data.inside_tree); } else { // Thread processing. return true;