fix -Wreturn-std-move

This commit is contained in:
wmayer
2019-09-07 15:19:28 +02:00
parent cc2e507817
commit d05ae18340
8 changed files with 14 additions and 14 deletions

View File

@@ -2350,7 +2350,7 @@ namespace
<< ": " << ex.DynamicType()->Name();
if ( ex.GetMessageString() && strlen( ex.GetMessageString() ))
str << ": " << ex.GetMessageString();
return str;
return std::move(str);
}
//================================================================================
/*!
@@ -2364,7 +2364,7 @@ namespace
if ( strlen( netgen::multithread.task ) > 0 )
str << " at " << netgen::multithread.task;
str << ": " << ex.What();
return str;
return std::move(str);
}
//================================================================================

View File

@@ -643,7 +643,7 @@ TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
}
}
return aCompound;
return std::move(aCompound);
}
//=======================================================================

View File

@@ -2100,7 +2100,7 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
}
}
return aCompound;
return std::move(aCompound);
}
//=======================================================================

View File

@@ -374,7 +374,7 @@ QIcon ViewProviderPythonFeatureImp::getIcon() const
std::vector<App::DocumentObject*>
ViewProviderPythonFeatureImp::claimChildren(std::vector<App::DocumentObject*>&& base) const
{
_FC_PY_CALL_CHECK(claimChildren,return(base));
_FC_PY_CALL_CHECK(claimChildren,return (std::move(base)));
std::vector<App::DocumentObject*> children;
Base::PyGILStateLocker lock;

View File

@@ -236,7 +236,7 @@ TopoDS_Shape FaceMakerCheese::makeFace(const std::vector<TopoDS_Wire>& w)
builder.Add(comp, aFace);
}
return comp;
return std::move(comp);
}
else {
return TopoDS_Shape(); // error

View File

@@ -2226,7 +2226,7 @@ TopoDS_Shape TopoShape::makeHelix(Standard_Real pitch, Standard_Real height,
TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf);
TopoDS_Wire wire = BRepBuilderAPI_MakeWire(edgeOnSurf);
BRepLib::BuildCurves3d(wire);
return wire;
return std::move(wire);
}
//***********
@@ -2312,7 +2312,7 @@ TopoDS_Shape TopoShape::makeLongHelix(Standard_Real pitch, Standard_Real height,
TopoDS_Wire wire = mkWire.Wire();
BRepLib::BuildCurves3d(wire);
return wire;
return std::move(wire);
}
TopoDS_Shape TopoShape::makeThread(Standard_Real pitch,
@@ -2932,7 +2932,7 @@ TopoDS_Shape TopoShape::makeOffset2D(double offset, short joinType, bool fill, b
builder.MakeCompound(result);
for(TopoDS_Shape &sh : shapesToReturn)
builder.Add(result, sh);
return result;
return std::move(result);
}
else {
return shapesToReturn[0];
@@ -3179,7 +3179,7 @@ TopoDS_Shape TopoShape::removeSplitter() const
builder.Add(comp, xp.Current());
}
return comp;
return std::move(comp);
}
return _Shape;

View File

@@ -542,7 +542,7 @@ TopoDS_Shape PartGui::DlgProjectionOnSurface::create_compound(const std::vector<
}
}
}
return aCompound;
return std::move(aCompound);
}
void PartGui::DlgProjectionOnSurface::show_projected_shapes(const std::vector<SShapeStore>& iShapeStoreVec)

View File

@@ -1730,7 +1730,7 @@ TopoDS_Shape Area::toShape(CArea &area, short fill, int reorient) {
builder.Add(compound,s);\
}\
if(TopExp_Explorer(compound,TopAbs_EDGE).More())\
return compound;\
return std::move(compound);\
return TopoDS_Shape();\
}\
return mySections[_index]->_op(_index, ## __VA_ARGS__);\
@@ -1868,7 +1868,7 @@ TopoDS_Shape Area::makeOffset(int index,PARAM_ARGS(PARAM_FARG,AREA_PARAMS_OFFSET
if(thicken)
FC_DURATION_LOG(d,"Thicken");
if(TopExp_Explorer(compound,TopAbs_EDGE).More())
return compound;
return std::move(compound);
return TopoDS_Shape();
}
@@ -2255,7 +2255,7 @@ TopoDS_Shape Area::toShape(const CArea &area, bool fill, const gp_Trsf *trsf, in
AREA_WARN("FaceMakerBullseye failed: "<<e.what());
}
}
return compound;
return std::move(compound);
}
struct WireInfo {