From 185d52297cf0825f65cec6a9646808614fb86e93 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Wed, 23 Feb 2022 22:42:38 +0100 Subject: [PATCH] Remove wrong assert and fix typo in comments --- include/reactphysics3d/components/Components.h | 2 +- src/systems/CollisionDetectionSystem.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/reactphysics3d/components/Components.h b/include/reactphysics3d/components/Components.h index 34cdd4dc..17dfa001 100644 --- a/include/reactphysics3d/components/Components.h +++ b/include/reactphysics3d/components/Components.h @@ -137,7 +137,7 @@ RP3D_FORCE_INLINE bool Components::hasComponent(Entity entity) const { return mMapEntityToComponentIndex.containsKey(entity); } -// Return true if there is a component for a given entiy and if so set the entity index +// Return true if there is a component for a given entity and if so set the entity index RP3D_FORCE_INLINE bool Components::hasComponentGetIndex(Entity entity, uint32& entityIndex) const { auto it = mMapEntityToComponentIndex.find(entity); diff --git a/src/systems/CollisionDetectionSystem.cpp b/src/systems/CollisionDetectionSystem.cpp index fa7ef6b0..a61b4ee4 100644 --- a/src/systems/CollisionDetectionSystem.cpp +++ b/src/systems/CollisionDetectionSystem.cpp @@ -665,7 +665,7 @@ void CollisionDetectionSystem::addContactPairsToBodies() { mRigidBodyComponents.addContacPair(contactPair.body2Entity, p); } - // If at least of body is a CollisionBody + // If at least one of the two bodies is a CollisionBody if (!isBody1Rigid || !isBody2Rigid) { // Add the pair index to the array of pairs with CollisionBody @@ -858,8 +858,6 @@ void CollisionDetectionSystem::createContacts() { // creation (only the pairs with two RigidBodies are added during island creation) mWorld->mProcessContactPairsOrderIslands.addRange(mCollisionBodyContactPairsIndices); - assert(mWorld->mProcessContactPairsOrderIslands.size() == (*mCurrentContactPairs).size()); - // Process the contact pairs in the order defined by the islands such that the contact manifolds and // contact points of a given island are packed together in the array of manifolds and contact points const uint32 nbContactPairsToProcess = static_cast(mWorld->mProcessContactPairsOrderIslands.size());