diff --git a/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/src/BulletCollision/CollisionShapes/btCompoundShape.cpp index 0aa75f2bf..04e0b63ed 100644 --- a/src/BulletCollision/CollisionShapes/btCompoundShape.cpp +++ b/src/BulletCollision/CollisionShapes/btCompoundShape.cpp @@ -77,8 +77,8 @@ void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisio if (m_dynamicAabbTree) { const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax); - int index = m_children.size(); - child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index); + size_t index = m_children.size(); + child.m_node = m_dynamicAabbTree->insert(bounds,reinterpret_cast(index) ); } m_children.push_back(child); @@ -303,7 +303,7 @@ void btCompoundShape::createAabbTreeFromChildren() m_dynamicAabbTree = new(mem) btDbvt(); btAssert(mem==m_dynamicAabbTree); - for ( int index = 0; index < m_children.size(); index++ ) + for ( size_t index = 0; index < m_children.size(); index++ ) { btCompoundShapeChild &child = m_children[index]; @@ -312,7 +312,7 @@ void btCompoundShape::createAabbTreeFromChildren() child.m_childShape->getAabb(child.m_transform,localAabbMin,localAabbMax); const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax); - child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index); + child.m_node = m_dynamicAabbTree->insert(bounds, reinterpret_cast(index) ); } } }