From 1a3cbb01772bda0d7ddd242273b557389329d77f Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Tue, 31 Jul 2012 16:53:44 +0000 Subject: [PATCH] fix unit test under Ubuntu fixes Issue 629, thanks to joshua.downer for the report and fix --- UnitTests/BulletUnitTests/TestLinearMath.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/UnitTests/BulletUnitTests/TestLinearMath.h b/UnitTests/BulletUnitTests/TestLinearMath.h index cf88fff79..9c5e86078 100644 --- a/UnitTests/BulletUnitTests/TestLinearMath.h +++ b/UnitTests/BulletUnitTests/TestLinearMath.h @@ -8,6 +8,17 @@ #define TEST_NUM_UNITSPHERE_POINTS 42 +namespace +{ + struct compLess + { + bool operator()(const int& p1, const int& p2) const + { + return p1 < p2; + } + }; +} + static btVector3 sPenetrationDirections[TEST_NUM_UNITSPHERE_POINTS] = { btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)), @@ -116,14 +127,7 @@ public: m_unsortedIntegers[i] = i; } - struct compLess - { - bool operator()(const int& p1, const int& p2) const - { - return p1 < p2; - } - }; - m_unsortedIntegers.quickSort(compLess()); + m_unsortedIntegers.quickSort(::compLess()); for (int i=1;i