From d72b8b50a09ad95e25f4111bce1a9d01cb422e91 Mon Sep 17 00:00:00 2001 From: Xuchen Han Date: Tue, 11 Feb 2020 15:24:50 -0800 Subject: [PATCH] swap->btSwap --- src/BulletSoftBody/btSoftBodyInternals.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/BulletSoftBody/btSoftBodyInternals.h b/src/BulletSoftBody/btSoftBodyInternals.h index 898703edb..5a29fe3aa 100644 --- a/src/BulletSoftBody/btSoftBodyInternals.h +++ b/src/BulletSoftBody/btSoftBodyInternals.h @@ -536,14 +536,6 @@ static SIMD_FORCE_INLINE bool bernsteinVFTest(const btSoftBody::Face* face, cons return coplanarAndInsideTest(k0, k1, k2, k3, face, node, dt); } -template -static SIMD_FORCE_INLINE void swap(T& a, T& b) -{ - T temp = a; - a = b; - b = temp; -} - static SIMD_FORCE_INLINE bool continuousCollisionDetection(const btSoftBody::Face* face, const btSoftBody::Node* node, const btScalar& dt, const btScalar& mrg, btVector3& bary) { if (hasSeparatingPlane(face, node, dt)) @@ -599,14 +591,14 @@ static SIMD_FORCE_INLINE bool continuousCollisionDetection(const btSoftBody::Fac if (num_roots > 1) { if (roots[0] > roots[1]) - swap(roots[0], roots[1]); + btSwap(roots[0], roots[1]); } if (num_roots > 2) { if (roots[0] > roots[2]) - swap(roots[0], roots[2]); + btSwap(roots[0], roots[2]); if (roots[1] > roots[2]) - swap(roots[1], roots[2]); + btSwap(roots[1], roots[2]); } for (int r = 0; r < num_roots; ++r) {