Fixed over 500 compile warnings. Mostly:
* Unused variables. * Missing newlines at ends of #included files. * signed int loop variables where the termination condition is an unsigned 'get number of' function. * 'NULL' used inappropriately for an integer or character constant (NULL is a pointer) * abstract base classes with no virtual destructor. * Floating point constants used to initialise integer variables.
This commit is contained in:
@@ -39,4 +39,5 @@ struct CollisionAlgorithmCreateFunc
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
#endif //COLLISION_CREATE_FUNC
|
||||
#endif //COLLISION_CREATE_FUNC
|
||||
|
||||
|
||||
@@ -334,8 +334,6 @@ void CollisionDispatcher::DispatchAllCollisionPairs(OverlappingPairCache* pairCa
|
||||
{
|
||||
//m_blockedForChanges = true;
|
||||
|
||||
int i;
|
||||
|
||||
int dispatcherId = GetUniqueId();
|
||||
|
||||
CollisionPairCallback collisionCallback(dispatchInfo,this,dispatcherId);
|
||||
@@ -344,4 +342,6 @@ void CollisionDispatcher::DispatchAllCollisionPairs(OverlappingPairCache* pairCa
|
||||
|
||||
//m_blockedForChanges = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ CollisionWorld::~CollisionWorld()
|
||||
//clean up remaining objects
|
||||
std::vector<CollisionObject*>::iterator i;
|
||||
|
||||
int index = 0;
|
||||
for (i=m_collisionObjects.begin();
|
||||
!(i==m_collisionObjects.end()); i++)
|
||||
|
||||
|
||||
@@ -141,4 +141,6 @@ float CompoundCollisionAlgorithm::CalculateTimeOfImpact(BroadphaseProxy* proxy0,
|
||||
}
|
||||
return hitFraction;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ class Dispatcher;
|
||||
/// Place holder, not fully implemented yet
|
||||
class CompoundCollisionAlgorithm : public CollisionAlgorithm
|
||||
{
|
||||
Dispatcher* m_dispatcher;
|
||||
BroadphaseProxy m_compoundProxy;
|
||||
BroadphaseProxy m_otherProxy;
|
||||
std::vector<BroadphaseProxy> m_childProxies;
|
||||
std::vector<CollisionAlgorithm*> m_childCollisionAlgorithms;
|
||||
|
||||
Dispatcher* m_dispatcher;
|
||||
BroadphaseProxy m_compound;
|
||||
|
||||
BroadphaseProxy m_other;
|
||||
|
||||
@@ -340,7 +340,6 @@ float ConvexConvexAlgorithm::CalculateTimeOfImpact(BroadphaseProxy* proxy0,Broad
|
||||
CollisionObject* col0 = static_cast<CollisionObject*>(m_box0.m_clientObject);
|
||||
|
||||
float squareMot0 = (col0->m_interpolationWorldTransform.getOrigin() - col0->m_worldTransform.getOrigin()).length2();
|
||||
float squareMot1 = (col1->m_interpolationWorldTransform.getOrigin() - col1->m_worldTransform.getOrigin()).length2();
|
||||
|
||||
if (squareMot0 < col0->m_ccdSquareMotionTreshold &&
|
||||
squareMot0 < col0->m_ccdSquareMotionTreshold)
|
||||
|
||||
@@ -13,6 +13,11 @@ SimulationIslandManager::SimulationIslandManager()
|
||||
{
|
||||
}
|
||||
|
||||
SimulationIslandManager::~SimulationIslandManager()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SimulationIslandManager::InitUnionFind(int n)
|
||||
{
|
||||
m_unionFind.reset(n);
|
||||
@@ -131,17 +136,13 @@ bool PersistentManifoldSortPredicate(const PersistentManifold* lhs, const Persis
|
||||
//
|
||||
void SimulationIslandManager::BuildAndProcessIslands(Dispatcher* dispatcher,CollisionObjectArray& collisionObjects, IslandCallback* callback)
|
||||
{
|
||||
|
||||
|
||||
int numBodies = collisionObjects.size();
|
||||
|
||||
//we are going to sort the unionfind array, and store the element id in the size
|
||||
//afterwards, we clean unionfind, to make sure no-one uses it anymore
|
||||
|
||||
GetUnionFind().sortIslands();
|
||||
int numElem = GetUnionFind().getNumElements();
|
||||
|
||||
int startIslandIndex=0,endIslandIndex=1;
|
||||
int endIslandIndex=1;
|
||||
|
||||
//update the sleeping state for bodies, if all are sleeping
|
||||
for (int startIslandIndex=0;startIslandIndex<numElem;startIslandIndex = endIslandIndex)
|
||||
|
||||
@@ -29,6 +29,7 @@ class SimulationIslandManager
|
||||
|
||||
public:
|
||||
SimulationIslandManager();
|
||||
virtual ~SimulationIslandManager();
|
||||
|
||||
|
||||
void InitUnionFind(int n);
|
||||
@@ -56,3 +57,4 @@ public:
|
||||
};
|
||||
|
||||
#endif //SIMULATION_ISLAND_MANAGER_H
|
||||
|
||||
|
||||
@@ -51,4 +51,5 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H
|
||||
#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user