1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0033375: Coding - Static Analyzing processing. Performance

Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)
This commit is contained in:
dpasukhi
2023-05-06 22:56:45 +00:00
committed by vglukhik
parent c28dd7f1cf
commit b2fedee6a1
265 changed files with 603 additions and 611 deletions

View File

@@ -966,8 +966,8 @@ static void RefEdgeInter(const TopoDS_Face& F,
static Standard_Integer evaluateMaxSegment(const Adaptor3d_CurveOnSurface& aCurveOnSurface)
{
Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface();
Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve();
const Handle(Adaptor3d_Surface)& aSurf = aCurveOnSurface.GetSurface();
const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve();
Standard_Real aNbSKnots = 0, aNbC2dKnots = 0;
@@ -1513,7 +1513,7 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge
//purpose :
//=======================================================================
static Standard_Boolean UpdateVertex(TopoDS_Vertex V,
static Standard_Boolean UpdateVertex(const TopoDS_Vertex& V,
TopoDS_Edge& OE,
TopoDS_Edge& NE,
Standard_Real TolConf)
@@ -1960,7 +1960,7 @@ void BRepOffset_Inter2d::ConnexIntByIntInVert
TopExp_Explorer Exp1, Exp2;
Standard_Boolean bCoincide;
// intersect edges generated from vertex with the edges of the face
TopoDS_Shape NE3 = Build(Vref);
const TopoDS_Shape& NE3 = Build(Vref);
//
for (Exp2.Init(NE3, TopAbs_EDGE); Exp2.More(); Exp2.Next()) {
const TopoDS_Edge& aE3 = *(TopoDS_Edge*)&Exp2.Current();

View File

@@ -544,7 +544,7 @@ static void FillContours(const TopoDS_Shape& aShape,
TopoDS_Wire aWire = TopoDS::Wire(itf.Value());
for (Wexp.Init(aWire, aFace); Wexp.More(); Wexp.Next())
{
TopoDS_Edge anEdge = Wexp.Current();
const TopoDS_Edge& anEdge = Wexp.Current();
if (BRep_Tool::Degenerated(anEdge))
continue;
const BRepOffset_ListOfInterval& Lint = Analyser.Type(anEdge);

View File

@@ -181,10 +181,10 @@ static void UpdateEdge (const TopoDS_Edge& E,
//purpose : Particular case of Curve On Surface.
//=======================================================================
static void ComputeCurve3d(TopoDS_Edge Edge,
static void ComputeCurve3d(const TopoDS_Edge& Edge,
const Handle(Geom2d_Curve)& Curve,
const Handle(Geom_Surface)& Surf,
const TopLoc_Location Loc,
const TopLoc_Location& Loc,
Standard_Real Tol)
{
// try to find the particular case

View File

@@ -3963,7 +3963,7 @@ TopoDS_Shape BRepOffset_Tool::Deboucle3D(const TopoDS_Shape& S,
//=======================================================================
static Standard_Boolean IsInOut (BRepTopAdaptor_FClass2d& FC,
Geom2dAdaptor_Curve AC,
const Geom2dAdaptor_Curve& AC,
const TopAbs_State& S )
{
Standard_Real Def = 100*Precision::Confusion();