From f65644f3e046508f954c9b024f42495a3919cc5f Mon Sep 17 00:00:00 2001 From: Lunkhound Date: Sun, 29 Jan 2017 21:13:24 -0800 Subject: [PATCH] fix compile error when BT_THREADSAFE not defined --- examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp b/examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp index a3a6e742a..6a7634618 100644 --- a/examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp +++ b/examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp @@ -51,6 +51,8 @@ TaskManager gTaskMgr; #define BT_OVERRIDE #endif +static int gNumIslands = 0; + class Profiler { @@ -439,8 +441,6 @@ struct UpdateIslandDispatcher } }; -static int gNumIslands = 0; - void parallelIslandDispatch( btAlignedObjectArray* islandsPtr, btSimulationIslandManagerMt::IslandCallback* callback ) { ProfileHelper prof(Profiler::kRecordDispatchIslands); @@ -746,7 +746,7 @@ void CommonRigidBodyMTBase::createEmptyDynamicsWorld() m_broadphase = new btDbvtBroadphase(); -#if USE_PARALLEL_ISLAND_SOLVER +#if BT_THREADSAFE && USE_PARALLEL_ISLAND_SOLVER { btConstraintSolver* solvers[ BT_MAX_THREAD_COUNT ]; int maxThreadCount = btMin( int(BT_MAX_THREAD_COUNT), TaskManager::getMaxNumThreads() );