fix warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]

This commit is contained in:
wmayer
2018-02-10 12:18:33 +01:00
parent ed52b2ef51
commit 1e0d4b7a5c
2 changed files with 5 additions and 5 deletions

View File

@@ -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,

View File

@@ -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)