Made some pointers const.

This commit is contained in:
hiker 2014-01-30 12:27:12 +11:00
parent 1709ccc36d
commit c80a78dcf2

View File

@ -454,16 +454,16 @@ btScalar Physics::solveGroup(btCollisionObject** bodies, int numBodies,
btPersistentManifold* contact_manifold = btPersistentManifold* contact_manifold =
m_dynamics_world->getDispatcher()->getManifoldByIndexInternal(i); m_dynamics_world->getDispatcher()->getManifoldByIndexInternal(i);
btCollisionObject* objA = const btCollisionObject* objA =
static_cast<btCollisionObject*>(contact_manifold->getBody0()); static_cast<const btCollisionObject*>(contact_manifold->getBody0());
btCollisionObject* objB = const btCollisionObject* objB =
static_cast<btCollisionObject*>(contact_manifold->getBody1()); static_cast<const btCollisionObject*>(contact_manifold->getBody1());
unsigned int num_contacts = contact_manifold->getNumContacts(); unsigned int num_contacts = contact_manifold->getNumContacts();
if(!num_contacts) continue; // no real collision if(!num_contacts) continue; // no real collision
UserPointer *upA = (UserPointer*)(objA->getUserPointer()); const UserPointer *upA = (UserPointer*)(objA->getUserPointer());
UserPointer *upB = (UserPointer*)(objB->getUserPointer()); const UserPointer *upB = (UserPointer*)(objB->getUserPointer());
if(!upA || !upB) continue; if(!upA || !upB) continue;