diff options
Diffstat (limited to 'modules/bullet')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 4 | ||||
-rw-r--r-- | modules/bullet/shape_bullet.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 3054debaec..6b2b0c4ad0 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -1404,8 +1404,8 @@ void BulletPhysicsServer3D::free(RID p_rid) { ShapeBullet *shape = shape_owner.get_or_null(p_rid); // Notify the shape is configured - for (Map<ShapeOwnerBullet *, int>::Element *element = shape->get_owners().front(); element; element = element->next()) { - static_cast<ShapeOwnerBullet *>(element->key())->remove_shape_full(shape); + for (const KeyValue<ShapeOwnerBullet *, int> &element : shape->get_owners()) { + static_cast<ShapeOwnerBullet *>(element.key)->remove_shape_full(shape); } shape_owner.free(p_rid); diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp index 88ffb9ec67..ec039ba842 100644 --- a/modules/bullet/shape_bullet.cpp +++ b/modules/bullet/shape_bullet.cpp @@ -63,8 +63,8 @@ btCollisionShape *ShapeBullet::prepare(btCollisionShape *p_btShape) const { } void ShapeBullet::notifyShapeChanged() { - for (Map<ShapeOwnerBullet *, int>::Element *E = owners.front(); E; E = E->next()) { - ShapeOwnerBullet *owner = static_cast<ShapeOwnerBullet *>(E->key()); + for (const KeyValue<ShapeOwnerBullet *, int> &E : owners) { + ShapeOwnerBullet *owner = static_cast<ShapeOwnerBullet *>(E.key); owner->shape_changed(owner->find_shape(this)); } } |