add copy constructor for btAlignedObjectArray, to avoid crashes as reported by JamesH

http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?p=11600#p11600
This commit is contained in:
erwin.coumans
2008-11-30 16:47:36 +00:00
parent e26b11ea5a
commit 7e93be739b

View File

@@ -120,6 +120,19 @@ class btAlignedObjectArray
clear();
}
btAlignedObjectArray(const btAlignedObjectArray& otherArray)
{
init();
int otherSize = otherArray.size();
resize (otherSize);
int i;
for (i=0;i<otherSize;i++)
{
m_data[i] = otherArray[i];
}
}
SIMD_FORCE_INLINE int capacity() const
{ // return current length of allocated storage
return m_capacity;