Skip to content

Commit 35cfb9a

Browse files
committed
Make static checks happy
1 parent 351ea12 commit 35cfb9a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

scene/main/node.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,22 +2041,20 @@ TypedArray<Node> Node::find_children(const String &p_pattern, const String &p_ty
20412041
current_node->_update_children_cache();
20422042

20432043
if (p_recursive) {
2044-
// Try go to first child
20452044
if (!current_node->data.children_cache.is_empty()) {
2045+
// Go to first child
20462046
current_node = current_node->data.children_cache[0];
2047-
}
2048-
// Find next sibling
2049-
else {
2047+
} else {
2048+
// Find next sibling
20502049
while (current_node != this) {
20512050
const LocalVector<Node *> &siblings = current_node->data.parent->data.children_cache;
20522051

2053-
// Try go to next sibling
20542052
if (current_node->data.index + 1 < siblings.size()) {
2053+
// Go to next sibling
20552054
current_node = siblings[current_node->data.index + 1];
20562055
break;
2057-
}
2058-
// Go back to parent
2059-
else {
2056+
} else {
2057+
// Go back to parent
20602058
current_node = current_node->data.parent;
20612059
}
20622060
}

0 commit comments

Comments
 (0)