summaryrefslogtreecommitdiff
path: root/servers/physics_3d/body_3d_sw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_3d/body_3d_sw.cpp')
-rw-r--r--servers/physics_3d/body_3d_sw.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp
index 91fe80a3dc..069374d122 100644
--- a/servers/physics_3d/body_3d_sw.cpp
+++ b/servers/physics_3d/body_3d_sw.cpp
@@ -688,13 +688,13 @@ void BodySW::simulate_motion(const Transform3D& p_xform,real_t p_step) {
*/
void Body3DSW::wakeup_neighbours() {
- for (Map<Constraint3DSW *, int>::Element *E = constraint_map.front(); E; E = E->next()) {
- const Constraint3DSW *c = E->key();
+ for (const KeyValue<Constraint3DSW *, int> &E : constraint_map) {
+ const Constraint3DSW *c = E.key;
Body3DSW **n = c->get_body_ptr();
int bc = c->get_body_count();
for (int i = 0; i < bc; i++) {
- if (i == E->get()) {
+ if (i == E.value) {
continue;
}
Body3DSW *b = n[i];