Merge pull request #201 from bgossage/fix_pointer_cast
-- Corrected cast of 32-bit int to 64-bit pointer
This commit is contained in:
@@ -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<void*>(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<void*>(index) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user