summaryrefslogtreecommitdiff
path: root/servers/physics_server_2d.cpp
diff options
context:
space:
mode:
authorAaron Record <aaronjrecord@gmail.com>2022-05-18 17:43:40 -0600
committerAaron Record <aaronjrecord@gmail.com>2022-05-19 12:09:16 +0200
commit900c676b0282bed83d00834e3c280ac89c2bc94d (patch)
treeb6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /servers/physics_server_2d.cpp
parent71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff)
Use range iterators for RBSet in most cases
Diffstat (limited to 'servers/physics_server_2d.cpp')
-rw-r--r--servers/physics_server_2d.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index a9b7964858..41aae36785 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -158,8 +158,8 @@ Vector<RID> PhysicsRayQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
- ret.write[idx++] = E->get();
+ for (const RID &E : parameters.exclude) {
+ ret.write[idx++] = E;
}
return ret;
}
@@ -208,8 +208,8 @@ Vector<RID> PhysicsPointQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
- ret.write[idx++] = E->get();
+ for (const RID &E : parameters.exclude) {
+ ret.write[idx++] = E;
}
return ret;
}
@@ -267,8 +267,8 @@ Vector<RID> PhysicsShapeQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
- ret.write[idx++] = E->get();
+ for (const RID &E : parameters.exclude) {
+ ret.write[idx++] = E;
}
return ret;
}