@@ -325,6 +325,7 @@ void CompoundShape::RestoreBinaryState(StreamIn &inStream)
void CompoundShape::SaveSubShapeState(ShapeList &outSubShapes) const
{
outSubShapes.clear();
+ outSubShapes.reserve(mSubShapes.size());
for (const SubShape &shape : mSubShapes)
outSubShapes.push_back(shape.mShape);
}
@@ -573,7 +573,8 @@ void ConvexShape::RestoreBinaryState(StreamIn &inStream)
void ConvexShape::SaveMaterialState(PhysicsMaterialList &outMaterials) const
- outMaterials = { mMaterial };
+ outMaterials.clear();
+ outMaterials.push_back(mMaterial);
void ConvexShape::RestoreMaterialState(const PhysicsMaterialRefC *inMaterials, uint inNumMaterials)