diff --git a/source/core/physics/physics_world.cpp b/source/core/physics/physics_world.cpp index 7eb5654..8473124 100644 --- a/source/core/physics/physics_world.cpp +++ b/source/core/physics/physics_world.cpp @@ -3,7 +3,6 @@ #include "core/physics/physics_world.hpp" -#include #include #include "core/physics/rigid_body.hpp" @@ -14,9 +13,12 @@ namespace Physics { if (body == nullptr) { return; } - if (std::ranges::find(bodies_, body) == bodies_.end()) { - bodies_.push_back(body); + for (const auto* b : bodies_) { + if (b == body) { + return; + } } + bodies_.push_back(body); } void PhysicsWorld::removeBody(RigidBody* body) {