mirror of
https://github.com/godotengine/godot.git
synced 2024-11-12 23:24:26 +00:00
Decorate rare !data.inside_tree condition with unlikely
This commit is contained in:
parent
53e9d90850
commit
6c86268fdd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user