Disallow the operator= for btAlignedObjectArray, together with some fixes in the code (to avoid accidental deep copy)
Enable #define BT_ALLOW_ARRAY_COPY_OPERATOR in Bullet/LinearMath/btAlignedObjectArray.h to re-enable it Fixes Issue 564, thanks to Tissen Peter for the report/fix
This commit is contained in:
@@ -43,7 +43,7 @@ void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantized
|
||||
|
||||
NodeTriangleCallback& operator=(NodeTriangleCallback& other)
|
||||
{
|
||||
m_triangleNodes = other.m_triangleNodes;
|
||||
m_triangleNodes.copyFromArray(other.m_triangleNodes);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantized
|
||||
|
||||
QuantizedNodeTriangleCallback& operator=(QuantizedNodeTriangleCallback& other)
|
||||
{
|
||||
m_triangleNodes = other.m_triangleNodes;
|
||||
m_triangleNodes.copyFromArray(other.m_triangleNodes);
|
||||
m_optimizedTree = other.m_optimizedTree;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user