fix compile errors in non-threadsafe build
This commit is contained in:
@@ -114,7 +114,10 @@ struct InplaceSolverIslandCallbackMt : public btSimulationIslandManagerMt::Islan
|
||||
|
||||
btConstraintSolverPoolMt::ThreadSolver* btConstraintSolverPoolMt::getAndLockThreadSolver()
|
||||
{
|
||||
int i = btGetCurrentThreadIndex() % m_solvers.size();
|
||||
int i = 0;
|
||||
#if BT_THREADSAFE
|
||||
i = btGetCurrentThreadIndex() % m_solvers.size();
|
||||
#endif // #if BT_THREADSAFE
|
||||
while ( true )
|
||||
{
|
||||
ThreadSolver& solver = m_solvers[ i ];
|
||||
|
||||
@@ -465,6 +465,12 @@ bool btSpinMutex::tryLock()
|
||||
return true;
|
||||
}
|
||||
|
||||
// non-parallel version of btParallelFor
|
||||
void btParallelFor( int iBegin, int iEnd, int grainSize, const btIParallelForBody& body )
|
||||
{
|
||||
btAssert(!"called btParallelFor in non-threadsafe build. enable BT_THREADSAFE");
|
||||
body.forLoop( iBegin, iEnd );
|
||||
}
|
||||
|
||||
#endif // #if BT_THREADSAFE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user