modernize C++: use emplace

This commit is contained in:
wmayer
2023-08-07 01:01:53 +02:00
committed by Chris Hennes
parent dbad96d43e
commit df93b14ec0
4 changed files with 33 additions and 32 deletions

View File

@@ -189,7 +189,7 @@ App::Property *PropertyTopoShapeList::Copy() const
for (auto& shape : _lValueList) {
BRepBuilderAPI_Copy copy(shape.getShape());
TopoDS_Shape* newShape = new TopoDS_Shape(copy.Shape());
copiedShapes.push_back(*newShape);
copiedShapes.emplace_back(*newShape);
}
p->setValues(copiedShapes);
return p;