summaryrefslogtreecommitdiffstats
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-05-19 13:26:15 +0200
committerGitHub <noreply@github.com>2022-05-19 13:26:15 +0200
commitd8093dd27363384c7196dbff7e485f0df2b11894 (patch)
treeb6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /editor/plugins/node_3d_editor_plugin.cpp
parent71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff)
parent900c676b0282bed83d00834e3c280ac89c2bc94d (diff)
downloadredot-engine-d8093dd27363384c7196dbff7e485f0df2b11894.tar.gz
Merge pull request #61173 from LightningAA/update-set-iterators
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 1d85e80331..10c63afa02 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6710,8 +6710,8 @@ RBSet<RID> _get_physics_bodies_rid(Node *node) {
rids.insert(pb->get_rid());
}
RBSet<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node);
- for (RBSet<PhysicsBody3D *>::Element *I = child_nodes.front(); I; I = I->next()) {
- rids.insert(I->get()->get_rid());
+ for (const PhysicsBody3D *I : child_nodes) {
+ rids.insert(I->get_rid());
}
return rids;
@@ -6755,8 +6755,8 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
if (!found_valid_shape && vi.size()) {
AABB aabb = vi.front()->get()->get_transformed_aabb();
- for (RBSet<VisualInstance3D *>::Element *I = vi.front(); I; I = I->next()) {
- aabb.merge_with(I->get()->get_transformed_aabb());
+ for (const VisualInstance3D *I : vi) {
+ aabb.merge_with(I->get_transformed_aabb());
}
Vector3 size = aabb.size * Vector3(0.5, 0.0, 0.5);
from = aabb.position + size;