Merge pull request #88785 from KoBeWi/list_cringe
Fix inefficient list iteration in Node
This commit is contained in:
commit
81f3d43cc1
|
@ -2963,12 +2963,12 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
|
||||||
}
|
}
|
||||||
|
|
||||||
p_node->set_owner(owner);
|
p_node->set_owner(owner);
|
||||||
for (int i = 0; i < owned.size(); i++) {
|
for (Node *E : owned) {
|
||||||
owned[i]->set_owner(p_node);
|
E->set_owner(p_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < owned_by_owner.size(); i++) {
|
for (Node *E : owned_by_owner) {
|
||||||
owned_by_owner[i]->set_owner(owner);
|
E->set_owner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
p_node->set_scene_file_path(get_scene_file_path());
|
p_node->set_scene_file_path(get_scene_file_path());
|
||||||
|
|
Loading…
Reference in New Issue