Clean up about a bazillion compilation warnings.

This commit is contained in:
sjbaker
2006-12-22 02:33:42 +00:00
parent 4685bb8c4b
commit db573e4a59
23 changed files with 854 additions and 4260 deletions

View File

@@ -33,10 +33,10 @@ int gNumManifold = 0;
#include <stdio.h>
btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms)
:m_useIslands(true),
m_convexConvexCreateFunc(0),
btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms):
m_count(0),
m_useIslands(true),
m_convexConvexCreateFunc(0),
m_convexConcaveCreateFunc(0),
m_swappedConvexConcaveCreateFunc(0),
m_compoundCreateFunc(0),
@@ -62,8 +62,8 @@ m_emptyCreateFunc(0)
#ifndef BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION
btCollisionDispatcher::btCollisionDispatcher ():
m_useIslands(true),
m_count(0)
m_count(0),
m_useIslands(true)
{
int i;

View File

@@ -41,6 +41,7 @@ typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispa
///Time of Impact, Closest Points and Penetration Depth.
class btCollisionDispatcher : public btDispatcher
{
int m_count;
std::vector<btPersistentManifold*> m_manifoldsPtr;
@@ -68,7 +69,6 @@ class btCollisionDispatcher : public btDispatcher
public:
///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc);
@@ -92,8 +92,6 @@ public:
return m_manifoldsPtr[index];
}
int m_count;
///the default constructor creates/register default collision algorithms, for convex, compound and concave shape support
btCollisionDispatcher ();

View File

@@ -49,7 +49,7 @@ btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVecto
}
for (size_t i=0;i<m_points.size();i++)
for (int i=0;i<m_points.size();i++)
{
btPoint3 vtx = m_points[i] * m_localScaling;
@@ -73,7 +73,7 @@ void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const
supportVerticesOut[i][3] = btScalar(-1e30);
}
}
for (size_t i=0;i<m_points.size();i++)
for (int i=0;i<m_points.size();i++)
{
btPoint3 vtx = m_points[i] * m_localScaling;

View File

@@ -44,7 +44,6 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
{
btVector3 halfExtents = (aabbMax - aabbMin) * btScalar(0.5);
btScalar radius = halfExtents.length();
btVector3 center = (aabbMax + aabbMin) * btScalar(0.5);
//TODO
@@ -60,6 +59,7 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
btVector3 projectedCenter = center - (m_planeNormal.dot(center) - m_planeConstant)*m_planeNormal;
btVector3 triangle[3];
btScalar radius = halfExtents.length();
triangle[0] = projectedCenter + tangentDir0*radius + tangentDir1*radius;
triangle[1] = projectedCenter + tangentDir0*radius - tangentDir1*radius;
triangle[2] = projectedCenter - tangentDir0*radius - tangentDir1*radius;

View File

@@ -723,10 +723,10 @@ class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIn
public:
DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color)
: m_debugDrawer(debugDrawer),
m_worldTrans(worldTrans),
m_color(color)
DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color) :
m_debugDrawer(debugDrawer),
m_color(color),
m_worldTrans(worldTrans)
{
}

View File

@@ -30,12 +30,12 @@ static int uniqueId = 0;
btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution)
:
m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)),
m_angularFactor(btScalar(1.)),
m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_linearDamping(btScalar(0.)),
m_angularDamping(btScalar(0.5)),
m_optionalMotionState(motionState),

View File

@@ -41,7 +41,9 @@ void* btAlignedAlloc (int size, int alignment)
void btAlignedFree (void* ptr)
{
delete ptr;
delete [] (char*) ptr;
}
#endif
#endif

View File

@@ -174,4 +174,6 @@ class btAlignedObjectArray
};
#endif //BT_OBJECT_ARRAY__
#endif //BT_OBJECT_ARRAY__