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

@@ -177,7 +177,7 @@ static void RecModif (const TopoDS_Shape &S,
{
TopoDS_Shape r = S;
//gka -modification to keep history for shape with location (OCC21617)
TopLoc_Location aShLoc = S.Location();
const TopLoc_Location& aShLoc = S.Location();
TopLoc_Location aNullLoc;
r.Location(aNullLoc);
@@ -204,9 +204,9 @@ static void RecModif (const TopoDS_Shape &S,
Standard_Boolean modif = Standard_False;
BRep_Builder B;
for ( TopoDS_Iterator it(r,Standard_False); it.More(); it.Next() ) {
TopoDS_Shape sh = it.Value();
const TopoDS_Shape& sh = it.Value();
if ( repl.IsBound(sh) ) {
TopoDS_Shape newsh = repl.Find(sh);
const TopoDS_Shape& newsh = repl.Find(sh);
if ( ! newsh.IsNull() ) B.Add ( result, newsh );
modif = Standard_True;
}
@@ -366,7 +366,7 @@ static void ExplodeModifier (const TopoDS_Shape &S,
TopTools_DataMapOfShapeShape &map,
const TopAbs_ShapeEnum until)
{
TopoDS_Shape res = repl.ModifiedShape ( S );
const TopoDS_Shape& res = repl.ModifiedShape ( S );
if ( res != S )
{