use emplace_back instead of push_back where justified
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user