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

@@ -384,7 +384,7 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
wit.Initialize( CurFace );
for (; wit.More(); wit.Next())
{
TopoDS_Shape aWire = wit.Value();
const TopoDS_Shape& aWire = wit.Value();
if (! aWire.IsSame( CurWire ))
{
TColgp_SequenceOfPnt pts;
@@ -806,8 +806,8 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
TopTools_DataMapIteratorOfDataMapOfShapeShape itve (VEmap);
for (; itve.More (); itve.Next ())
{
TopoDS_Shape V = itve.Key ();
TopoDS_Shape E = itve.Value ();
const TopoDS_Shape& V = itve.Key ();
const TopoDS_Shape& E = itve.Value ();
TopoDS_Shape W;
for (i = 1; i <= Eseq.Length (); i++)
{
@@ -915,7 +915,7 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
eit.Initialize (aWire, Standard_False);
for (; eit.More (); eit.Next ())
{
TopoDS_Shape anEdge = eit.Value ();
const TopoDS_Shape& anEdge = eit.Value ();
BB.Add (CurWire, anEdge);
}
if (aSub.IsCopied (CurFace))

View File

@@ -417,7 +417,7 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/
Standard_Integer aSign = 1;
TopoDS_Vertex Vfirst, Vlast;
TopExp::Vertices(anEdge, Vfirst, Vlast);
TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge);
const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge);
TColStd_ListOfInteger IList;
aWorkingSection = TopoDS::Wire(WorkingSections(ii));
Standard_Integer NbNewEdges = aNewEdges.Extent();