fix warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
This commit is contained in:
@@ -1490,7 +1490,7 @@ std::vector<shared_ptr<Area> > Area::makeSections(
|
||||
}
|
||||
}
|
||||
FC_TIME_LOG(t,"makeSection count: " << sections.size()<<", total");
|
||||
return std::move(sections);
|
||||
return sections;
|
||||
}
|
||||
|
||||
TopoDS_Shape Area::getPlane(gp_Trsf *trsf) {
|
||||
@@ -2582,7 +2582,7 @@ struct ShapeInfo{
|
||||
if(max_dist>0 && d>max_dist)
|
||||
break;
|
||||
}
|
||||
return std::move(wires);
|
||||
return wires;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2783,7 +2783,7 @@ std::list<TopoDS_Shape> Area::sortWires(const std::list<TopoDS_Shape> &shapes,
|
||||
foreachSubshape(shape,
|
||||
WireOrienter(wires,dir,orientation,direction), TopAbs_WIRE);
|
||||
}
|
||||
return std::move(wires);
|
||||
return wires;
|
||||
}
|
||||
|
||||
ShapeParams rparams(abscissa,nearest_k>0?nearest_k:1,orientation,direction);
|
||||
@@ -2965,7 +2965,7 @@ std::list<TopoDS_Shape> Area::sortWires(const std::list<TopoDS_Shape> &shapes,
|
||||
FC_DURATION_LOG(rparams.rd,"rtree clean");
|
||||
FC_DURATION_LOG(rparams.xd,"BRepExtrema");
|
||||
FC_TIME_LOG(t,"sortWires total");
|
||||
return std::move(wires);
|
||||
return wires;
|
||||
}
|
||||
|
||||
static inline void addParameter(bool verbose, Command &cmd, const char *name,
|
||||
|
||||
@@ -202,7 +202,7 @@ std::list<TopoDS_Shape> FeatureAreaView::getShapes() {
|
||||
count = all_shapes.size();
|
||||
for(int i=index;i<count;++i)
|
||||
shapes.push_back(all_shapes[i]);
|
||||
return std::move(shapes);
|
||||
return shapes;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *FeatureAreaView::execute(void)
|
||||
|
||||
Reference in New Issue
Block a user