use emplace_back instead of push_back where justified

This commit is contained in:
asapelkin
2019-10-25 00:57:12 +03:00
committed by wmayer
parent 98f0a11ec0
commit ced8100ab9
67 changed files with 239 additions and 241 deletions

View File

@@ -647,7 +647,7 @@ std::vector<Base::Vector3d> ViewProviderPartExt::getModelPoints(const SoPickedPo
if (subShape.ShapeType() == TopAbs_VERTEX) {
const TopoDS_Vertex& v = TopoDS::Vertex(subShape);
gp_Pnt p = BRep_Tool::Pnt(v);
pts.push_back(Base::Vector3d(p.X(),p.Y(),p.Z()));
pts.emplace_back(p.X(),p.Y(),p.Z());
}
// get the nearest point on the edge
else if (subShape.ShapeType() == TopAbs_EDGE) {
@@ -656,7 +656,7 @@ std::vector<Base::Vector3d> ViewProviderPartExt::getModelPoints(const SoPickedPo
BRepExtrema_DistShapeShape distSS(subShape, mkVert.Vertex(), 0.1);
if (distSS.NbSolution() > 0) {
gp_Pnt p = distSS.PointOnShape1(1);
pts.push_back(Base::Vector3d(p.X(),p.Y(),p.Z()));
pts.emplace_back(p.X(),p.Y(),p.Z());
}
}
// get the nearest point on the face
@@ -666,7 +666,7 @@ std::vector<Base::Vector3d> ViewProviderPartExt::getModelPoints(const SoPickedPo
BRepExtrema_DistShapeShape distSS(subShape, mkVert.Vertex(), 0.1);
if (distSS.NbSolution() > 0) {
gp_Pnt p = distSS.PointOnShape1(1);
pts.push_back(Base::Vector3d(p.X(),p.Y(),p.Z()));
pts.emplace_back(p.X(),p.Y(),p.Z());
}
}