]> OCCT Git - occt.git/commitdiff
0033375: Coding - Static Analyzing processing. Performance
authordpasukhi <dpasukhi@opencascade.com>
Sat, 6 May 2023 22:56:45 +0000 (22:56 +0000)
committervglukhik <vglukhik@opencascade.com>
Fri, 19 May 2023 18:33:59 +0000 (19:33 +0100)
Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)

265 files changed:
src/AIS/AIS_C0RegularityFilter.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AdvApp2Var/AdvApp2Var_SysBase.cxx
src/Approx/Approx_CurveOnSurface.cxx
src/Approx/Approx_CurveOnSurface.hxx
src/BOPAlgo/BOPAlgo_BuilderSolid.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTools/BOPTools_AlgoTools3D.cxx
src/BOPTools/BOPTools_AlgoTools_2.cxx
src/BRepAlgo/BRepAlgo.cxx
src/BRepAlgo/BRepAlgo_Loop.cxx
src/BRepBndLib/BRepBndLib.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx
src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepCheck/BRepCheck_Face.cxx
src/BRepClass/BRepClass_Intersector.cxx
src/BRepClass3d/BRepClass3d_SClassifier.cxx
src/BRepExtrema/BRepExtrema_DistShapeShape.cxx
src/BRepFeat/BRepFeat.cxx
src/BRepFeat/BRepFeat_Form.cxx
src/BRepFeat/BRepFeat_MakeDPrism.cxx
src/BRepFeat/BRepFeat_MakePrism.cxx
src/BRepFeat/BRepFeat_MakeRevol.cxx
src/BRepFill/BRepFill.cxx
src/BRepFill/BRepFill_CompatibleWires.cxx
src/BRepFill/BRepFill_Evolved.cxx
src/BRepFill/BRepFill_Filling.cxx
src/BRepFill/BRepFill_MultiLine.cxx
src/BRepFill/BRepFill_OffsetWire.cxx
src/BRepFill/BRepFill_Pipe.cxx
src/BRepFill/BRepFill_PipeShell.cxx
src/BRepFill/BRepFill_Sweep.cxx
src/BRepFill/BRepFill_TrimEdgeTool.cxx
src/BRepFill/BRepFill_TrimShellCorner.cxx
src/BRepLib/BRepLib.cxx
src/BRepLib/BRepLib_PointCloudShape.cxx
src/BRepMAT2d/BRepMAT2d_Explorer.cxx
src/BRepMesh/BRepMesh_Delaun.cxx
src/BRepMesh/BRepMesh_Delaun.hxx [changed mode: 0755->0644]
src/BRepOffset/BRepOffset_Inter2d.cxx
src/BRepOffset/BRepOffset_MakeOffset.cxx
src/BRepOffset/BRepOffset_Offset.cxx
src/BRepOffset/BRepOffset_Tool.cxx
src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/BRepProj/BRepProj_Projection.cxx
src/BRepTest/BRepTest_CurveCommands.cxx
src/BRepToIGES/BRepToIGES_BRWire.cxx
src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx
src/BRepTools/BRepTools.cxx
src/BRepTools/BRepTools.hxx
src/BRepTools/BRepTools_Quilt.cxx
src/BRepTools/BRepTools_ReShape.cxx
src/BiTgte/BiTgte_Blend.cxx
src/Bisector/Bisector_Inter.cxx
src/CDM/CDM_Document.cxx
src/ChFi2d/ChFi2d_Builder_0.cxx
src/ChFi2d/ChFi2d_FilletAlgo.cxx
src/ChFi3d/ChFi3d.cxx
src/ChFi3d/ChFi3d_Builder.cxx
src/ChFi3d/ChFi3d_Builder_1.cxx
src/ChFi3d/ChFi3d_Builder_6.cxx
src/ChFi3d/ChFi3d_Builder_CnCrn.cxx
src/ChFi3d/ChFi3d_Builder_SpKP.cxx
src/DBRep/DBRep.cxx
src/DDF/DDF_DataCommands.cxx
src/DDataStd/DDataStd_BasicCommands.cxx
src/DDocStd/DDocStd_ShapeSchemaCommands.cxx
src/DE/DE_Wrapper.cxx
src/DNaming/DNaming.cxx
src/DNaming/DNaming_BooleanOperationDriver.cxx
src/DNaming/DNaming_ModelingCommands.cxx
src/DNaming/DNaming_SelectionCommands.cxx
src/DNaming/DNaming_ToolsCommands.cxx
src/Draft/Draft_Modification_1.cxx
src/Draw/Draw_PloadCommands.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx
src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx
src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx
src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx
src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx
src/GeomFill/GeomFill_Pipe.cxx
src/GeomLib/GeomLib.cxx
src/GeomLib/GeomLib.hxx
src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx
src/GeometryTest/GeometryTest_APICommands.cxx
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CubeMapOrder.cxx
src/Graphic3d/Graphic3d_CubeMapOrder.hxx
src/Graphic3d/Graphic3d_CubeMapPacked.cxx
src/Graphic3d/Graphic3d_CubeMapPacked.hxx
src/Graphic3d/Graphic3d_StructureManager.cxx
src/Graphic3d/Graphic3d_Vertex.cxx
src/IFGraph/IFGraph_Articulations.cxx
src/IFGraph/IFGraph_ConnectedComponants.cxx
src/IFSelect/IFSelect_BasicDumper.cxx
src/IFSelect/IFSelect_CheckCounter.cxx
src/IFSelect/IFSelect_ModelCopier.cxx
src/IFSelect/IFSelect_SelectExtract.cxx
src/IFSelect/IFSelect_SelectRootComps.cxx
src/IFSelect/IFSelect_SelectRoots.cxx
src/IFSelect/IFSelect_SelectSignature.cxx
src/IFSelect/IFSelect_Selection.cxx
src/IFSelect/IFSelect_SignatureList.cxx
src/IFSelect/IFSelect_TransformStandard.cxx
src/IFSelect/IFSelect_WorkSession.cxx
src/IGESCAFControl/IGESCAFControl_Provider.cxx
src/IGESCAFControl/IGESCAFControl_Provider.hxx
src/IGESCAFControl/IGESCAFControl_Reader.cxx
src/IGESCAFControl/IGESCAFControl_Writer.cxx
src/IGESControl/IGESControl_Reader.cxx
src/IGESData/IGESData_GeneralModule.cxx
src/IGESData/IGESData_IGESModel.cxx
src/IGESDraw/IGESDraw_ToolViewsVisible.cxx
src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx
src/IGESSelect/IGESSelect.cxx
src/IGESSelect/IGESSelect_Dumper.cxx
src/IGESToBRep/IGESToBRep_Reader.cxx
src/IGESToBRep/IGESToBRep_TopoSurface.cxx
src/IntPatch/IntPatch_ImpPrmIntersection.cxx
src/IntTools/IntTools_Context.cxx
src/IntTools/IntTools_Tools.cxx
src/Interface/Interface_Graph.cxx
src/Interface/Interface_GraphContent.cxx
src/Interface/Interface_InterfaceModel.cxx
src/Interface/Interface_MSG.cxx
src/Interface/Interface_ShareTool.cxx
src/LocOpe/LocOpe_SplitDrafts.cxx
src/LocOpe/LocOpe_SplitShape.cxx
src/LocOpe/LocOpe_Spliter.cxx
src/MAT2d/MAT2d_Mat2d.cxx
src/MeshTest/MeshTest.cxx
src/MeshVS/MeshVS_Mesh.cxx
src/Message/Message_PrinterToReport.cxx
src/Message/Message_PrinterToReport.hxx
src/Message/Message_Report.cxx
src/MoniTool/MoniTool_AttrList.cxx
src/MoniTool/MoniTool_TypedValue.cxx
src/OpenGl/OpenGl_Text.cxx
src/PCDM/PCDM_ReadWriter.cxx
src/PrsDim/PrsDim.cxx
src/PrsDim/PrsDim_PerpendicularRelation.cxx
src/PrsDim/PrsDim_TangentRelation.cxx
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/QABugs/QABugs_1.cxx
src/QABugs/QABugs_10.cxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_16.cxx
src/QABugs/QABugs_17.cxx
src/QABugs/QABugs_19.cxx
src/QABugs/QABugs_20.cxx
src/QABugs/QABugs_3.cxx
src/QABugs/QABugs_PresentableObject.cxx
src/QADNaming/QADNaming_ToolsCommands.cxx
src/RWGltf/RWGltf_Provider.cxx
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx
src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx
src/STEPCAFControl/STEPCAFControl_Provider.cxx
src/STEPCAFControl/STEPCAFControl_Provider.hxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPCAFControl/STEPCAFControl_Writer.hxx
src/STEPConstruct/STEPConstruct_Assembly.cxx
src/STEPConstruct/STEPConstruct_ExternRefs.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/STEPSelections/STEPSelections_Counter.cxx
src/SWDRAW/SWDRAW.cxx
src/SelectMgr/SelectMgr_SelectableObjectSet.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx
src/ShapeAnalysis/ShapeAnalysis_Shell.cxx
src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx
src/ShapeBuild/ShapeBuild_Edge.cxx
src/ShapeBuild/ShapeBuild_ReShape.cxx
src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx
src/ShapeExtend/ShapeExtend_Explorer.cxx
src/ShapeFix/ShapeFix.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_IntersectionTool.cxx
src/ShapeFix/ShapeFix_Shell.cxx
src/ShapeFix/ShapeFix_Solid.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeProcess/ShapeProcess_ShapeContext.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx
src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx
src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
src/StdLPersistent/StdLPersistent_Dependency.cxx
src/StdPersistent/StdPersistent_Naming.cxx
src/StdPrs/StdPrs_Curve.cxx
src/StepAP209/StepAP209_Construct.cxx
src/StepData/StepData_StepModel.cxx
src/StepData/StepData_StepWriter.cxx
src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx
src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx
src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx
src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx
src/StepToTopoDS/StepToTopoDS_Builder.cxx
src/StepToTopoDS/StepToTopoDS_NMTool.cxx
src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx
src/TDF/TDF_CopyLabel.cxx
src/TDF/TDF_Data.cxx
src/TDF/TDF_Tool.cxx
src/TDocStd/TDocStd_Application.cxx
src/TNaming/TNaming_Name.cxx
src/TObj/TObj_Assistant.cxx
src/TObj/TObj_Assistant.hxx
src/TopOpeBRep/TopOpeBRep_DSFiller.cxx
src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx
src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx
src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx
src/TopOpeBRep/TopOpeBRep_LineInter.cxx
src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx
src/TopOpeBRep/TopOpeBRep_kpart.cxx
src/TopOpeBRep/TopOpeBRep_vpr.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx
src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx
src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx
src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
src/TopoDS/TopoDS_Iterator.hxx
src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx
src/Transfer/Transfer_Finder.cxx
src/Transfer/Transfer_TransferInput.cxx
src/Transfer/Transfer_TransferOutput.cxx
src/TransferBRep/TransferBRep.cxx
src/Units/Units_UnitSentence.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/VrmlData/VrmlData_Scene.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XDEDRAW/XDEDRAW_Common.cxx
src/XDEDRAW/XDEDRAW_Shapes.cxx
src/XSAlgo/XSAlgo_AlgoContainer.cxx
src/XSControl/XSControl_ConnectedShapes.cxx
src/XSControl/XSControl_FuncShape.cxx
src/XSControl/XSControl_Reader.cxx
src/XSControl/XSControl_TransferReader.cxx
src/XSControl/XSControl_Utils.cxx
src/XSDRAWIGES/XSDRAWIGES.cxx
src/math/math_FunctionSetRoot.cxx

index 8becc91faa6e2c7cdebac0f3414b1668d8e0e4bc..f0e74c0fe7c75cd181047f171e78b2fc041f04a5 100644 (file)
@@ -56,7 +56,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
       }
     }
     if (Ok) {
-      TopoDS_Shape curEdge = SubShapes.FindKey( i );
+      const TopoDS_Shape& curEdge = SubShapes.FindKey( i );
       myMapOfEdges.Add(curEdge);
     }
   }
index 866259af85da90da38677f28713bacb26863fc0c..13344563e90509b028edbf6b301ca7d8edb7ee76 100644 (file)
@@ -945,7 +945,7 @@ void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI,
   Standard_Boolean isRedisplayed = Standard_False;
   for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
   {
-    Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
+    const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key();
     if (anObj->Type() != theKOI)
     {
       continue;
@@ -1155,7 +1155,7 @@ void AIS_InteractiveContext::SetDisplayMode(const Standard_Integer theMode,
       continue;
     }
 
-    Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
+    const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value();
     aStatus->SetDisplayMode (theMode);
 
     if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
@@ -2251,7 +2251,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)&
 
   for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
   {
-    const Handle(SelectMgr_SelectableObject) anObject = anIter.Key();
+    const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key();
     Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
     aBndSelected.Add (aTmpBox);
   }
index 7f32dcb631058946e8b6086c89102371f743049c..ae1bf729c537cf2cec40c1a7c47291061245fcf3 100644 (file)
@@ -1789,7 +1789,7 @@ int maoverf_(integer *nbentr,
     /* Loop. The upper limit is the integer value of the logarithm of base 2
      */
     /* of NBENTR/NLONGR. */
-    i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.))
+    i__1 = (integer) (std::log((real) (*nbentr) / (float)63.) / std::log((float)2.))
       ;
     for (ibid = 1; ibid <= i__1; ++ibid) {
       
index 1899d0eb82f90d8d8c06374f2e7364186cd33bc1..4a616a2a1e5193253f1eaa29e2dddd3b2cccc1ba 100644 (file)
@@ -556,7 +556,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
 //function : isIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                                   Standard_Boolean&                theIsU,
                                                   Standard_Real&                   theParam,
                                                   Standard_Boolean&                theIsForward) const
@@ -638,7 +638,7 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d
 //function : buildC3dOnIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                                           const Standard_Boolean           theIsU,
                                                           const Standard_Real              theParam,
                                                           const Standard_Boolean           theIsForward)
index 55f376e5c87dcbcda0cb0047ba475deb7406d08b..c3541e357dda049bcfa69226b8ba3ef54b58def9 100644 (file)
@@ -85,7 +85,7 @@ protected:
   //! @param theParam     Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 2d curve is a line and Standard_False otherwise.
-  Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                              Standard_Boolean&                theIsU,
                              Standard_Real&                   theParam,
                              Standard_Boolean&                theIsForward) const;
@@ -97,7 +97,7 @@ protected:
   //! @param theParam Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 3d curve is built and Standard_False otherwise.
-  Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                      const Standard_Boolean           theIsU,
                                      const Standard_Real              theParam,
                                      const Standard_Boolean           theIsForward);
index 05db2286c5fd57b8ace1fcd502eb6c640ba4cb7f..9049bfbcebac386ff6692d45102f863ec106c86b 100644 (file)
@@ -733,7 +733,7 @@ void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
   //
   aNbF = theMF.Extent();
   for (i = 1; i <= aNbF; ++i) {
-    TopoDS_Shape aF = theMF(i);
+    const TopoDS_Shape& aF = theMF(i);
     TopExp::MapShapesAndAncestors(aF, 
         TopAbs_EDGE, TopAbs_FACE, 
         aMEF);
index f22b0c2a3fab876e7ba1adc81302a3932136edd3..7ea2cdb65a6489ffd7d4846172ef1753265ef3d3 100644 (file)
@@ -667,7 +667,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
     for (Standard_Integer i=1; i<=aNbCurves; i++) {
       const IntTools_Curve& anIC=aSCs(i);
 
-      Handle (Geom_Curve)  aC3D = anIC.Curve();
+      const Handle (Geom_Curve)&  aC3D = anIC.Curve();
 
       if (aC3D.IsNull()) {
         di << " has Null 3d curve# " << i << "\n";
@@ -682,8 +682,8 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
       DrawTrSurf::Set(nameC, aC3D);
       di << nameC << " ";
       //
-      Handle(Geom2d_Curve) aPC1 = anIC.FirstCurve2d();
-      Handle(Geom2d_Curve) aPC2 = anIC.SecondCurve2d();
+      const Handle(Geom2d_Curve)& aPC1 = anIC.FirstCurve2d();
+      const Handle(Geom2d_Curve)& aPC2 = anIC.SecondCurve2d();
       //
       if (!aPC1.IsNull() || !aPC2.IsNull()) {
         di << "(";
index c620cbd7013856a2cf555631e92ce4b9c59375b5..9b6ecce5893dbb6a2289d07c85013c3d6ee17194 100644 (file)
@@ -736,7 +736,7 @@ void Add(const TopoDS_Shape& aS,
     return;
   }
   //
-  TopoDS_Shape aSx = aS;
+  const TopoDS_Shape& aSx = aS;
   //
   anIndex=myShapes.FindIndex(aSx);
   if (!anIndex) {
index f066189c5209164d2c56fe5addbc412fd1381984..96034feede557c9f8e48800be9d7ae0f428c7dd0 100644 (file)
@@ -112,7 +112,7 @@ void BOPTools_AlgoTools::MakeSectEdge(const IntTools_Curve& aIC,
                                       const Standard_Real  aP2,
                                       TopoDS_Edge& aNewEdge)
 {
-  Handle(Geom_Curve) aC=aIC.Curve ();
+  const Handle(Geom_Curve)& aC=aIC.Curve ();
   
   BRepBuilderAPI_MakeEdge aMakeEdge(aC, aV1, aV2, aP1, aP2);
   
index f7a1c0ea3665e13044ecc9e4b1c1be491f21704b..1fc8dc0a2a7acd4169c9b2cd29ef1d47ec3bc994 100644 (file)
@@ -383,7 +383,7 @@ TopoDS_Edge  BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire)
   BRepTools_WireExplorer wexp(theWire);
 
   for (; wexp.More(); wexp.Next()) {
-    TopoDS_Edge anEdge = wexp.Current();
+    const TopoDS_Edge& anEdge = wexp.Current();
     Standard_Real fpar, lpar;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
 
@@ -392,7 +392,7 @@ TopoDS_Edge  BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire)
 
     GeomAdaptor_Curve  aGACurve(aCurve);
     GeomAbs_CurveType  aType       = aGACurve.GetType();
-    Handle(Geom_Curve) aBasisCurve = aGACurve.Curve();
+    const Handle(Geom_Curve)& aBasisCurve = aGACurve.Curve();
     Standard_Boolean   isFwd       = (wexp.Orientation() != TopAbs_REVERSED);
 
     if (aBasisCurve->IsPeriodic()) {
index ba6b1e6052c80268fd9e1813d490301cf1a9e151..828e9f091e6bdc15ea5600d4dd2a22f021a90797 100644 (file)
@@ -284,7 +284,7 @@ static void RemovePendingEdges(TopTools_IndexedDataMapOfShapeListOfShape& MVE)
 //purpose  : 
 //=======================================================================
 
-static Standard_Boolean  SamePnt2d(TopoDS_Vertex  V,
+static Standard_Boolean  SamePnt2d(const TopoDS_Vertex&  V,
                                   TopoDS_Edge&   E1,
                                   TopoDS_Edge&   E2,
                                   TopoDS_Face&   F)
index f3ab8ed86042bb6502deed0240a54c0993e0e30c..db239c421753696f5e352ebb787a82995cb8c7ea 100644 (file)
@@ -47,7 +47,7 @@
 //
 static Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS);
 //
-static void FindExactUVBounds(const TopoDS_Face F, 
+static void FindExactUVBounds(const TopoDS_Face& F, 
                               Standard_Real& umin, Standard_Real& umax, 
                               Standard_Real& vmin, Standard_Real& vmax,
                               const Standard_Real Tol, 
@@ -460,7 +460,7 @@ Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS)
 //function : FindExactUVBounds
 //purpose  : 
 //=======================================================================
-void FindExactUVBounds(const TopoDS_Face FF, 
+void FindExactUVBounds(const TopoDS_Face& FF, 
                        Standard_Real& umin, Standard_Real& umax, 
                        Standard_Real& vmin, Standard_Real& vmax,
                        const Standard_Real Tol, 
index 2f54913e2c6b1b3251014fd99f103bd6d1f36f59..c179841760b56500468e89a3b2f8be6a06d362a7 100644 (file)
@@ -58,7 +58,7 @@ static void BuildBack (const TopTools_DataMapOfShapeListOfShape& M1,
 //=======================================================================
 
 static void  Replace (      TopTools_ListOfShape& L,
-                     const TopoDS_Shape          Old,
+                     const TopoDS_Shape&          Old,
                      const TopTools_ListOfShape& New)
 {
   //-----------------------------------
@@ -150,7 +150,7 @@ static void Update (   TopTools_DataMapOfShapeListOfShape& Mod,
     if (!LIG.IsEmpty()) {
       if (ModBack.IsBound(S)) {
        // Generation de modif  => generation du shape initial
-       TopoDS_Shape IS = ModBack(S);
+       const TopoDS_Shape& IS = ModBack(S);
        StoreImage (Gen,IS,GenBack,LIG);
       }
       else {
index 5d74c718568f760fcfbadb451c496a6c32803e6d..8f919bfa6efc7c47450860c2c08bd4e799a1a923 100644 (file)
@@ -237,7 +237,7 @@ void BRepBuilderAPI_MakeShapeOnMesh::Build(const Message_ProgressRange& theRange
     gp_Pln aPln(myMesh->Node(anIdx[0]), aNorm);
 
     BRepBuilderAPI_MakeFace aFaceMaker(aPln, aWire);
-    const TopoDS_Face aFace = aFaceMaker.Face();
+    const TopoDS_Face& aFace = aFaceMaker.Face();
 
     aBB.Add(aResult, aFace);
   }
index 65bb5ab958766bc4c5e7ba9dd58b98103ed17f6b..5054222ff0b9aab36766b43b5d65932e995f8d58 100644 (file)
@@ -374,7 +374,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Shape& edge,
   for (Standard_Integer i = 1; i <= seqEdges.Length(); i++) {
 
     // Retrieve candidate section
-    TopoDS_Shape oedge2 = seqEdges(i);
+    const TopoDS_Shape& oedge2 = seqEdges(i);
 
     if (mySewing) {
 
@@ -1393,7 +1393,7 @@ void BRepBuilderAPI_Sewing::AnalysisNearestEdges(const TopTools_SequenceOfShape&
   // (they have other nearest edges belonging to the work face)
   for(Standard_Integer k = 1; k<= seqNotCandidate.Length(); k++) {
     Standard_Integer index1 = seqNotCandidate.Value(k);
-    TopoDS_Shape edge = sequenceSec.Value(index1);
+    const TopoDS_Shape& edge = sequenceSec.Value(index1);
     TopTools_SequenceOfShape tmpSeq;
     tmpSeq.Append(edge);
     for(Standard_Integer kk = 1; kk <= seqIndCandidate.Length();kk++) 
@@ -2928,7 +2928,7 @@ void BRepBuilderAPI_Sewing::VerticesAssembling(const Message_ProgressRange& theP
     for (i = 1; i <= myBoundFaces.Extent(); i++) {
       TopoDS_Shape bound = myBoundFaces.FindKey(i);
       for (TopoDS_Iterator itv(bound,Standard_False); itv.More(); itv.Next()) {
-       TopoDS_Shape node = itv.Value();
+       const TopoDS_Shape& node = itv.Value();
        if (myNodeSections.IsBound(node))
          myNodeSections(node).Append(bound);
        else {
@@ -2991,7 +2991,7 @@ static void replaceNMVertices(const TopoDS_Edge& theEdge,
       theReShape->Replace(aSeqNMVert.Value(i),theV2);
       continue;
     }
-    TopoDS_Shape aV = aSeqNMVert.Value(i);
+    const TopoDS_Shape& aV = aSeqNMVert.Value(i);
     Standard_Integer j =1;
     for( ; j <= aEdParams.Length();j++) {
       Standard_Real apar2 = aEdParams.Value(j);
@@ -3508,7 +3508,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
   TopTools_MapOfShape mapEdges;
   mapEdges.Add(edge);
   for (Standard_Integer i = 1; i <= mapVert1.Extent(); i++) {
-    TopoDS_Shape node1 = mapVert1.FindKey(i);
+    const TopoDS_Shape& node1 = mapVert1.FindKey(i);
     if (!myNodeSections.IsBound(node1)) continue;
     TopTools_ListIteratorOfListOfShape ilsec(myNodeSections(node1));
     for (; ilsec.More(); ilsec.Next()) {
@@ -4453,7 +4453,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape&
       if (jdist < 0.0) {
         // Bind new cutting node (end vertex only)
         seqDist.SetValue(indexMin,disProj);
-        TopoDS_Shape cvertex = seqVert.Value(indexMin);
+        const TopoDS_Shape& cvertex = seqVert.Value(indexMin);
         NodeCuttingVertex.Add(node,cvertex);
       }
       else {
index f128ec6d4d96336b31b611a6b16511c624c6ad05..b05003f42fc70f28489cec95faa082d61069cd8b 100644 (file)
@@ -625,7 +625,7 @@ static Standard_Boolean Intersect(const TopoDS_Wire& wir1,
     MapW1.Add( exp1.Current() );
   for (exp2.Init( wir2, TopAbs_VERTEX ); exp2.More(); exp2.Next())
     {
-      TopoDS_Shape V = exp2.Current();
+      const TopoDS_Shape& V = exp2.Current();
       if (MapW1.Contains( V ))
        CommonVertices.Append( V );
     }
index b0665864e119c5bfb30ca390a177e5be19f651c7..1d843ef771e4685f9cc20da883a9aa578ae6ae29 100644 (file)
@@ -248,7 +248,6 @@ void CheckSkip(Geom2dInt_GInter& theInter,
   {
     return;
   }
-  const TopoDS_Edge anEl = theE.NextEdge(); // the next edge
   if (!(BRep_Tool::Tolerance(aVl) > theMaxTol) || theE.NextEdge().IsNull())
   {
     return;
index 1cbf729b2308460576d9c030248dfc83f371d009..ae44086e0a4edd5e320fdee190d8ed484a225f4f 100644 (file)
@@ -46,7 +46,7 @@ static
 
 //gets transition of line <L> passing through/near the edge <e> of faces <f1>, <f2>. <param> is
 // a parameter on the edge where the minimum distance between <l> and <e> was found
-static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e,
+static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge& e,
                      Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans);
 
 static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Real param, gp_Dir& OutDir);
@@ -607,7 +607,7 @@ static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E,
 //=======================================================================
 static Standard_Integer GetTransi(const TopoDS_Face& f1,
                                   const TopoDS_Face& f2,
-                                  const TopoDS_Edge e,
+                                  const TopoDS_Edge& e,
                                   const Standard_Real param,
                                   const gp_Lin& L,
                                   IntCurveSurface_TransitionOnCurve& trans)
index fdf1594598e8aea8afe9bec9b016592e1264d036..c77cd09de565e1067441936df87f36a8f02e43bb 100644 (file)
@@ -65,8 +65,8 @@ namespace
     }
   }
 
-  inline Standard_Real DistanceInitiale(const TopoDS_Vertex V1,
-                                        const TopoDS_Vertex V2)
+  inline Standard_Real DistanceInitiale(const TopoDS_Vertex& V1,
+                                        const TopoDS_Vertex& V2)
   {
     return (BRep_Tool::Pnt(V1).Distance(BRep_Tool::Pnt(V2)));
   }
index 725050a01f0b04ed4321be725f0082231452ddf8..010de828ac2632293ffe36d320816b41a33294ed 100644 (file)
@@ -312,7 +312,7 @@ void BRepFeat::ParametricMinMax(const TopoDS_Shape& S,
 //=======================================================================
 
 static Standard_Boolean IsIn (BRepTopAdaptor_FClass2d& FC,
-                              Geom2dAdaptor_Curve      AC)
+                              const Geom2dAdaptor_Curve& AC)
 {
  Standard_Real Def = 100*Precision::Confusion();
  GCPnts_QuasiUniformDeflection QU(AC,Def);
index 19f1de65c1c785a917a935591f69cff4560b3c3b..4ea9ea05a538ba2e0454addaea78f29ccda0d8df 100644 (file)
@@ -489,7 +489,7 @@ static void Descendants(const TopoDS_Shape&,
 #endif
     theGlue.Perform();
     if (theGlue.IsDone()) {
-      TopoDS_Shape shshs = theGlue.ResultingShape();
+      const TopoDS_Shape& shshs = theGlue.ResultingShape();
 //      if (BRepOffsetAPI::IsTopologicallyValid(shshs)) {
       if (BRepAlgo::IsValid(shshs)) {
         UpdateDescendants(theGlue);
index 7f01a42ba841a953a95f6274242064baa476b2d2..5060d327ccabc8dca3adc23f77e269a0ee306b29 100644 (file)
@@ -66,7 +66,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
   const TopoDS_Shape& theSFrom,
   const TopoDS_Shape& theSUntil);
 
-static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
   const TopoDS_Shape& Until);
 
 static Handle(Geom_Curve) TestCurve(const TopoDS_Face&);
@@ -212,13 +212,13 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
   //  myPbase.Orientation(TopAbs_FORWARD);
 
   LocOpe_DPrism theDPrism(myPbase,theheight,myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
 
   MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
 
   myGShape = VraiDPrism;
   GeneratedShapeValid();  
-  TopoDS_Shape Base = theDPrism.FirstShape();
+  const TopoDS_Shape& Base = theDPrism.FirstShape();
   TopExp_Explorer exp(Base, TopAbs_FACE);
   TopoDS_Face theBase = TopoDS::Face(exp.Current());
   exp.Next();
@@ -295,12 +295,12 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
   Standard_Real Height = 
     sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil);
   LocOpe_DPrism theDPrism(myPbase,Height,myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
   if(!Trf) {
     MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
     myGShape = VraiDPrism;
     GeneratedShapeValid();
-    TopoDS_Shape Base = theDPrism.FirstShape();
+    const TopoDS_Shape& Base = theDPrism.FirstShape();
     exp.Init(Base, TopAbs_FACE);
     TopoDS_Face theBase = TopoDS::Face(exp.Current());
     exp.Next();
@@ -350,7 +350,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
       UpdateDescendants(trP, trP.Shape(), Standard_False);
 
       TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID);
-      TopoDS_Shape Cutsh = ex.Current();
+      const TopoDS_Shape& Cutsh = ex.Current();
       if(myFuse == 1) {
         BRepAlgoAPI_Fuse f(mySbase, Cutsh);
         myShape = f.Shape();
@@ -446,7 +446,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
   Standard_Real Height = 
     sens*HeightMax(mySbase, myPbase, mySFrom, mySUntil);
   LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
 
 
   if(!Trff) {
@@ -575,7 +575,7 @@ void BRepFeat_MakeDPrism::PerformUntilEnd()
   //  myPbase.Orientation(TopAbs_FORWARD);
 
   LocOpe_DPrism theDPrism(myPbase, Height, myAngle);  
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
 
   MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
 
@@ -624,7 +624,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
     sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil);
 
   LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
   if(VraiDPrism.IsNull()) {
     NotDone();
     myStatusError = BRepFeat_NullRealTool;
@@ -762,7 +762,7 @@ void BRepFeat_MakeDPrism::PerformThruAll()
 
   Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil);
   LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
   MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
 
   myGShape = VraiDPrism;
@@ -819,13 +819,13 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
   Standard_Integer sens = SensOfPrism(C, mySUntil);
 
   LocOpe_DPrism theDPrism(myPbase,sens*Height,myAngle);
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
+  const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
 
   if(!Trf) {    // case face finished
     MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
     myGShape = VraiDPrism;
     GeneratedShapeValid();
-    TopoDS_Shape Base = theDPrism.FirstShape();
+    const TopoDS_Shape& Base = theDPrism.FirstShape();
     exp.Init(Base, TopAbs_FACE);
     TopoDS_Face theBase = TopoDS::Face(exp.Current());
     exp.Next();
@@ -1074,7 +1074,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase,  // shape initial
 //function : SensOfPrism
 //purpose  : determine the direction of prism generation
 //=======================================================================
-Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
   const TopoDS_Shape& Until)
 {
   LocOpe_CSIntersector ASI1(Until);
index daa4a39a7f5fddabd987c3bee3f1ea8f7b9ad902..27eade49fd25c9cf2d242e3e79ab9416ef9e4a01 100644 (file)
@@ -68,7 +68,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
                               const TopoDS_Shape& theSFrom,
                               const TopoDS_Shape& theSUntil);
 
-static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
                                    const TopoDS_Shape& Until);
 
 static Handle(Geom_Curve) TestCurve(const TopoDS_Shape&,
@@ -215,7 +215,7 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
 //construction of prism of height Length
 
   LocOpe_Prism thePrism(myPbase,V);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
   
 // management of descendants
   MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
@@ -325,7 +325,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
 
 // construction of long prism
   LocOpe_Prism thePrism(myPbase,V);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
 
 // in case of support of face Until
   if(!Trf) {    
@@ -366,7 +366,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
       UpdateDescendants(trP, trP.Shape(), Standard_False);
       //
       TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID);
-      TopoDS_Shape Cutsh = ex.Current();
+      const TopoDS_Shape& Cutsh = ex.Current();
       if (myFuse == 1 && !myJustFeat) {
         BRepAlgoAPI_Fuse f(mySbase, Cutsh);
         myShape = f.Shape();
@@ -591,7 +591,7 @@ void BRepFeat_MakePrism::PerformUntilEnd()
   gp_Vec V(2*Height*myDir);
   
   LocOpe_Prism thePrism(myPbase,V);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
   
   MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
   
@@ -651,7 +651,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until)
   gp_Vec Vtra(-3*Height*sens/2.*myDir);
   gp_Vec Vect(3*sens*Height*myDir);
   LocOpe_Prism thePrism(myPbase,Vect,Vtra);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
   
   if(!Trf) {  // case face until 
     MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
@@ -775,7 +775,7 @@ void BRepFeat_MakePrism::PerformThruAll()
   gp_Vec V(3*Height*myDir);
   gp_Vec Vtra(-3*Height/2.*myDir);
   LocOpe_Prism thePrism(myPbase,V,Vtra);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
   MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
 
   myGShape = VraiPrism;
@@ -830,7 +830,7 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until,
   Standard_Integer sens = SensOfPrism(C, mySUntil);
   gp_Vec V(sens*Length*myDir);
   LocOpe_Prism thePrism(myPbase,V);
-  TopoDS_Shape VraiPrism = thePrism.Shape();
+  const TopoDS_Shape& VraiPrism = thePrism.Shape();
 
   if(!Trf) {
     MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
@@ -978,7 +978,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
 //function : SensOfPrism
 //purpose  : Direction of the prism depending on the shape Until
 //=======================================================================
-Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
                             const TopoDS_Shape& Until)
 {
   LocOpe_CSIntersector ASI1(Until);
index 69eeee218d65e008e6562436d58bfd7ceede9480..df0c9805135c35a1d92cbb5737d6e3af037e38ce 100644 (file)
@@ -353,7 +353,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
     myGShape = VraiRevol;
     GeneratedShapeValid();
 
-    TopoDS_Shape Base = theRevol.FirstShape();
+    const TopoDS_Shape& Base = theRevol.FirstShape();
     exp.Init(Base, TopAbs_FACE);
     TopoDS_Face theBase = TopoDS::Face(exp.Current());
     exp.Next();
@@ -633,7 +633,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
     myGShape = VraiRevol;
     GeneratedShapeValid();
 
-    TopoDS_Shape Base = theRevol.FirstShape();
+    const TopoDS_Shape& Base = theRevol.FirstShape();
     exp.Init(Base, TopAbs_FACE);
     TopoDS_Face theBase = TopoDS::Face(exp.Current());
     exp.Next();
@@ -732,7 +732,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
   TopTools_DataMapOfShapeShape& theMap)
 {
   Standard_Boolean GluedFaces = Standard_True;
-  TopoDS_Shape VraiRevol = theRevol.Shape();
+  const TopoDS_Shape& VraiRevol = theRevol.Shape();
 
   TColGeom_SequenceOfCurve scur;
   theRevol.Curves(theCurves);
index 38fd29fa4f0cb860f0a98b39fc6ca4469aa65fb0..33533e16bccbb1672c642bd353791508d6823915 100644 (file)
@@ -986,8 +986,8 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
       }
     }
 
-    TopoDS_Edge E = anExp.Current();
-    TopoDS_Vertex V = anExp.CurrentVertex();
+    const TopoDS_Edge& E = anExp.Current();
+    const TopoDS_Vertex& V = anExp.CurrentVertex();
 
     if (ndec==0 || BRep_Tool::Degenerated(E)) {
       // copy the edge
index 7474c7b346e137d9209a3276d66402fed5cb8210..1133af2f792d47c066b92fbe344f9f9678d0ab03 100644 (file)
@@ -128,7 +128,7 @@ static void AddNewEdge(const TopoDS_Shape& theEdge,
     const TopTools_SequenceOfShape& NewEdges = theEdgeNewEdges(theEdge);
     for (Standard_Integer i = 1; i <= NewEdges.Length(); i++)
     {
-      TopoDS_Shape anEdge = NewEdges(i);
+      const TopoDS_Shape& anEdge = NewEdges(i);
       AddNewEdge(anEdge, theEdgeNewEdges, ListNewEdges);
     }
   }
@@ -1309,7 +1309,7 @@ void BRepFill_CompatibleWires::
   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itmap(myMap);
   for (; itmap.More(); itmap.Next())
   {
-    TopoDS_Shape anEdge = itmap.Key();
+    const TopoDS_Shape& anEdge = itmap.Key();
     TopTools_ListOfShape ListOfNewEdges;
 
     //for each edge of <myMap> find all newest edges
index 6655ffb4411a30be3b002254eae7f20fda1550f8..e3a2c72a9784ceda4b2cef5a21bf5e29723c96d9 100644 (file)
@@ -711,7 +711,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face&              Sp,
     for (WireExp.Init(TopoDS::Wire(FaceExp.Current())); WireExp.More(); 
       WireExp.Next()) {
 
-        TopoDS_Edge   CurrentEdge = WireExp.Current();
+        const TopoDS_Edge&   CurrentEdge = WireExp.Current();
         TopoDS_Vertex VFirst,VLast;
         EdgeVertices(CurrentEdge,VFirst,VLast);
 
@@ -2139,7 +2139,7 @@ void BRepFill_Evolved::MakeSolid()
   B.MakeCompound(Res);
 
   for (; exp.More(); exp.Next()) {
-    TopoDS_Shape Sh = exp.Current();
+    const TopoDS_Shape& Sh = exp.Current();
     B.MakeSolid(Sol);
     B.Add(Sol,Sh);
     BRepClass3d_SolidClassifier SC(Sol);
index 89f77932a1f3bf5de3f7638758a33f19b815bb30..6266e1ba321a62740968eb0e816b3f8b653f31e2 100644 (file)
@@ -59,7 +59,7 @@
 #include <TopoDS_Wire.hxx>
 #include <Geom_Surface.hxx>
 
-static gp_Vec MakeFinVec( const TopoDS_Wire aWire, const TopoDS_Vertex aVertex )
+static gp_Vec MakeFinVec( const TopoDS_Wire& aWire, const TopoDS_Vertex& aVertex )
 {
   TopoDS_Vertex Vfirst, Vlast, Origin;
   BRepTools_WireExplorer Explo( aWire );
index 9f27aa77ab55d5e336ed14fe41f92d7d51c87b88..4b4714dad8713915e8a7a9e6f2e98d539bbea3c4 100644 (file)
@@ -655,7 +655,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real        U,
     }
 #endif    
 
-    Geom2dAdaptor_Curve Cu1 = TheV;
+    const Geom2dAdaptor_Curve& Cu1 = TheV;
     Geom2dAdaptor_Curve Cu2( Line);
 
     Standard_Real TolConf = 0.;
index 0c7cb2b840503f06406778efc67c8986a31ea54e..6db9e9df4daefdcf566fc827701a96671d5c01c9 100644 (file)
@@ -570,7 +570,7 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset,
       TopoDS_Iterator itws( myWorkSpine );
       for (; itws.More(); itws.Next())
       {
-        TopoDS_Shape aWire = itws.Value();
+        const TopoDS_Shape& aWire = itws.Value();
         aSubst.Build( aWire );
         if (aSubst.IsCopied(aWire))
         {
index 8fe76d21b894cc541121699f7b30ad18b12053ad..46e2b34d4c205aa2bf6cd560f96df05de2f88427 100644 (file)
@@ -746,7 +746,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
     TopExp_Explorer Explo(result, TopAbs_FACE);
     for (; Explo.More(); Explo.Next())
     {
-      TopoDS_Shape aFace = Explo.Current();
+      const TopoDS_Shape& aFace = Explo.Current();
       RebuildTopOrBottomFace(aFace.Reversed(), Standard_True); //top face was reversed
     }
     /////
@@ -987,7 +987,7 @@ void BRepFill_Pipe::RebuildTopOrBottomFace(const TopoDS_Shape& aFace,
     TopoDS_Iterator itw(aWire);
     for (; itw.More(); itw.Next())
     {
-      TopoDS_Shape anEdge = itw.Value();
+      const TopoDS_Shape& anEdge = itw.Value();
       for (ii = myCurIndexOfSectionEdge; ii <= mySections->ColLength(); ii++)
       {
         TopoDS_Shape aVisoEdge = mySections->Value(ii, IndexOfSection);
index e0405b02c2901bd49e311ca6cfce2934af6dae8e..d924ff4f47f15fbaf77580eee205afd32782222d 100644 (file)
@@ -1116,7 +1116,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape&   theShape,
         for (; Explo.More(); Explo.Next())
         {
           const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
-          TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge);
+          const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge);
           myEdgeNewEdges.Bind(anEdge, aNewEdges);
         }
       }
@@ -1168,7 +1168,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
                                  Sec.Vertex(),
                                  Sec.WithContact(),
                                  Sec.WithCorrection());
-  TopoDS_Wire TmpWire =  Sec.Wire();
+  const TopoDS_Wire& TmpWire =  Sec.Wire();
   aTrsf = Place.Transformation();
   //Transform the copy
   W = TopoDS::Wire(BRepBuilderAPI_Transform(TmpWire, aTrsf, Standard_True));
index e6a1e238b8ba1b7e53225ca69cf740aa56bdb9f6..f275ec69b1c3f18f467402aa52dcb35332fb4d59 100644 (file)
@@ -798,7 +798,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
   const Handle(IntTools_Context) aNullCtx;
   if (BOPTools_AlgoTools::IsMicroEdge(E, aNullCtx))
   {
-    TopoDS_Vertex aV = VF;
+    const TopoDS_Vertex& aV = VF;
     B.UpdateVertex(aV, P1.Distance(P2));
     B.MakeEdge(E);
     B.UpdateEdge(E, C2d, S, TopLoc_Location(), Tol);
index e6ae701b4c50985ad5c886d91d3b2d6c718acbd9..0cd9a0949dc1c881c946f302d8e3c94b794651bf 100644 (file)
@@ -180,8 +180,8 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis,
   Standard_Real Tol = Precision::Confusion();
   //  Standard_Real TolC = 1.e-9;
 
-  Geom2dAdaptor_Curve CBis(Bis);
-  Geom2dAdaptor_Curve CAC (AC);
+  const Geom2dAdaptor_Curve& CBis(Bis);
+  const Geom2dAdaptor_Curve& CAC (AC);
 
   //Intersector = Geom2dInt_GInter(CBis, CAC, TolC, Tol);
   Intersector = Geom2dInt_GInter(CAC, CBis, Tol, Tol);
@@ -245,8 +245,8 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis,
   Geom2dInt_GInter Intersector;
   Standard_Real TolC = Tol;
 
-  Geom2dAdaptor_Curve CBis(Bis);
-  Geom2dAdaptor_Curve CAC (AC);
+  const Geom2dAdaptor_Curve& CBis(Bis);
+  const Geom2dAdaptor_Curve& CAC (AC);
 
   Intersector = Geom2dInt_GInter(CAC, CBis, TolC, Tol);
 
index ddbf218fd452a66c96a3c4b79da465350f7a158e..f3265aa1abcc03f6531753ddf62631275523919c 100644 (file)
@@ -571,7 +571,7 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer
       aIt.Initialize(aLP);
       for ( ; aIt.More(); aIt.Next()) {
         const BOPDS_Pave& aPave = aIt.Value();
-        TopoDS_Shape aV = theDS->Shape(aPave.Index());
+        const TopoDS_Shape& aV = theDS->Shape(aPave.Index());
         
         if(aV.IsSame(alonevertices.First())) {
           if(!bfound1) {
index 3eec4083091ef843db389c9c50fe202d94d0fef9..2466e5dab3e62f6a2820fe466cef2fca0fbf7ecb 100644 (file)
@@ -288,8 +288,8 @@ static Standard_Integer evaluateMaxSegment(const Standard_Integer aMaxSegment,
 {
   if (aMaxSegment != 0) return aMaxSegment;
 
-  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;
 
@@ -1188,7 +1188,7 @@ static void GetCurve3d(const TopoDS_Edge& theEdge, Handle(Geom_Curve)& theC3d, S
 //function : UpdateVTol
 //purpose  : 
 //=======================================================================
-void UpdateVTol(const TopoDS_Vertex theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
+void UpdateVTol(const TopoDS_Vertex& theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
 {
   BRep_Builder aB;
   if (!theV1.IsNull())
index 0dcb94a095960ea7424cda486b4a80669934cfae..68b62d6d82e59002227efc60f41ef419717b4f47 100644 (file)
@@ -205,7 +205,7 @@ Standard_Boolean BRepLib_PointCloudShape::addDensityPoints (const TopoDS_Shape&
   BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax);
   BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion());
 
-  TopLoc_Location aLoc = theFace.Location();
+  const TopLoc_Location& aLoc = theFace.Location();
   const gp_Trsf& aTrsf = aLoc.Transformation();
   TopLoc_Location aLoc1;
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1);
index 32ba12c3be2b186c5d1763b0e8b292970fc7af95..c6ad6c6e606a0a6fdbb042c877059fa9dd551bc7 100644 (file)
@@ -163,7 +163,7 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
 
   // Treatment of the next edges:
   for (; anExp.More(); anExp.Next()) {
-    TopoDS_Edge  anEdge = anExp.Current();
+    const TopoDS_Edge&  anEdge = anExp.Current();
 
     anOldNewE.Add(anEdge, anEdge);
     C2d  = BRep_Tool::CurveOnSurface (anEdge, aFace, UFirst, ULast);
index 0aa1eeb2bab2fcb502cbc4dbe44f4ca8d8a63490..307bf59bd122205ed6687a538345ab35f53c1a63 100644 (file)
@@ -1103,7 +1103,7 @@ Standard_Integer BRepMesh_Delaun::findNextPolygonLink(
   const gp_Vec2d&                       theRefLinkDir,
   const IMeshData::SequenceOfBndB2d&    theBoxes,
   const IMeshData::SequenceOfInteger&   thePolygon,
-  const Handle(IMeshData::MapOfInteger) theSkipped,
+  const Handle(IMeshData::MapOfInteger)& theSkipped,
   const Standard_Boolean&               isSkipLeprous,
   IMeshData::MapOfInteger&              theLeprousLinks,
   IMeshData::MapOfInteger&              theDeadLinks,
old mode 100755 (executable)
new mode 100644 (file)
index fb57554..8106590
@@ -214,7 +214,7 @@ private:
                                         const gp_Vec2d&                       theRefLinkDir,
                                         const IMeshData::SequenceOfBndB2d&    theBoxes,
                                         const IMeshData::SequenceOfInteger&   thePolygon,
-                                        const Handle(IMeshData::MapOfInteger) theSkipped,
+                                        const Handle(IMeshData::MapOfInteger)& theSkipped,
                                         const Standard_Boolean&               isSkipLeprous,
                                         IMeshData::MapOfInteger&              theLeprousLinks,
                                         IMeshData::MapOfInteger&              theDeadLinks,
index 12497481241362cd4c47ea9136c558e522524600..8b35e9301f3ff16d27ddf2c2e94f404af5846da1 100644 (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();
index c499d748dd3ecc614fb1d50da6887736311d87e3..5eccbe11f56dabf3ef96056451278e45feef178e 100644 (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);
index b1ecb8c4767a6717600d39c5b87cb6640d6ca468..bd37bcab0bacd8f2aca9301ce5cacf74cbe0b80c 100644 (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
index a7a1930e24f9a781ad6656bd2767ad3232bb8ef0..55c7cd359704d3c085fc6eb2d023d19c74a8e2fc 100644 (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();
index 051cf89694e0ec6fbc5e60e7000b310333b186c3..c70c95569c36d7095026b6b49d6bf2937ad19d04 100644 (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))
index 96c12766ac224733025feab4a1d2b1b80e88e5dc..f58c934dddbaf3bfd7ebde838cc98fc9866b33ad 100644 (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();
index d0a3a64bb78b38d836a990f70df54c7cfe8df031..d4f1b51601233d0d5f39210f1afcf4e29fc2ad3d 100644 (file)
@@ -184,7 +184,7 @@ BRepProj_Projection::BRepProj_Projection(const TopoDS_Shape& Wire,
   // Note: it is necessary to create copy of wire to avoid adding new pcurves into it
   Handle(BRepTools_TrsfModification) Trsf = new BRepTools_TrsfModification(T);
   BRepTools_Modifier Modif (Wire, Trsf);
-  TopoDS_Shape WireBase = Modif.ModifiedShape(Wire);
+  const TopoDS_Shape& WireBase = Modif.ModifiedShape(Wire);
 
   // Creation of a cylindrical surface
   BRepSweep_Prism CylSurf (WireBase, Vsup, Standard_False);
index 4bd39be3b7bd0f4d93a343fa52041e907a79f40e..11a49f95c06db0045d31525c57c60f9853043605 100644 (file)
@@ -1837,7 +1837,7 @@ static Standard_Integer arclinconvert (Draw_Interpretor& /*dout*/, Standard_Inte
       std::cout<<"Error: failed to find a face for the wire "<<a[2]<<std::endl;
       return 1; //TCL_ERROR
     }
-    TopoDS_Face aFace = aFaceMaker.Face();
+    const TopoDS_Face& aFace = aFaceMaker.Face();
     TopoDS_Iterator anIter (aFace);
     TopoDS_Wire aWire = TopoDS::Wire (anIter.Value());
     aResult = BRepAlgo::ConvertWire (aWire, aTol, aFace);
index 91be5308afb638a11e69175103097c3c195e7d47..0d665f34351484fc9d9ba32ca9fef763d16ef6b8 100644 (file)
@@ -528,7 +528,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire
   if ( TE.More()) {
     BRepTools_WireExplorer WE;
     for ( WE.Init(mywire); WE.More(); WE.Next()) {
-      TopoDS_Edge E = WE.Current();
+      const TopoDS_Edge& E = WE.Current();
       if (E.IsNull()) {
        AddWarning(mywire, "an Edge is a null entity");
       }
index 19264ed464bfd047d8fc68bd50a1e8d3d4a097b5..6d5ab9ad31708387cc2ddf7cc224dfbd3e140d0d 100644 (file)
@@ -134,7 +134,7 @@ void BRepToIGESBRep_Entity::TransferVertexList()
 //=============================================================================
 Standard_Integer BRepToIGESBRep_Entity::IndexVertex(const TopoDS_Vertex& myvertex) const
 {
-  TopoDS_Shape V = myvertex;
+  const TopoDS_Shape& V = myvertex;
   return myVertices.FindIndex(V);
 }
 
@@ -148,7 +148,7 @@ Standard_Integer BRepToIGESBRep_Entity::AddVertex(const TopoDS_Vertex& myvertex)
 {
   if ( myvertex.IsNull()) return 0;
   
-  TopoDS_Shape V = myvertex;
+  const TopoDS_Shape& V = myvertex;
   Standard_Integer index = myVertices.FindIndex(V);
   if (index == 0) {
     index = myVertices.Add(V);
@@ -214,7 +214,7 @@ void BRepToIGESBRep_Entity::TransferEdgeList()
 //=============================================================================
 Standard_Integer BRepToIGESBRep_Entity::IndexEdge(const TopoDS_Edge& myedge) const
 {
-  TopoDS_Shape E = myedge;
+  const TopoDS_Shape& E = myedge;
   return myEdges.FindIndex(E);
 }
 
@@ -229,7 +229,7 @@ Standard_Integer BRepToIGESBRep_Entity::AddEdge(const TopoDS_Edge& myedge,
 {
   if ( myedge.IsNull()) return 0;
   
-  TopoDS_Shape E = myedge;
+  const TopoDS_Shape& E = myedge;
   Handle(IGESData_IGESEntity) C = mycurve3d;
   Standard_Integer index = myEdges.FindIndex(E);
   if (index == 0) {
@@ -384,7 +384,7 @@ Handle(IGESSolid_Loop) BRepToIGESBRep_Entity::TransferWire (const TopoDS_Wire& m
   TopExp_Explorer TE(mywire, TopAbs_VERTEX);
   if ( TE.More()) {
     for ( WE.Init(mywire,myface); WE.More(); WE.Next()) { 
-      TopoDS_Edge E = WE.Current();
+      const TopoDS_Edge& E = WE.Current();
       if (E.IsNull()) {
        AddWarning(mywire, "an Edge is a null entity");
       }
index 7f2c71c14bd689233214b05aa0578731127ef42a..91e9cbf4367d0ef7c52e8443400dcf184023f3a8 100644 (file)
@@ -1300,7 +1300,7 @@ void BRepTools::DetectClosedness(const TopoDS_Face& theFace,
 
 Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE, 
                                  const Handle(Geom_Curve)& C3d, 
-                                 const Handle(Geom2d_Curve) C2d, 
+                                 const Handle(Geom2d_Curve)& C2d, 
                                  const Handle(Geom_Surface)& S,
                                  const Standard_Real f,
                                  const Standard_Real l)
index aad8edf62c0cb5367c1291f7d3bbe4b1be45e11f..579dc9244a2fb67b18d87735a1a1e68266a69836 100644 (file)
@@ -330,7 +330,7 @@ public:
   //! Method returns actual tolerance of edge
   Standard_EXPORT static Standard_Real EvalAndUpdateTol(const TopoDS_Edge& theE, 
                                                         const Handle(Geom_Curve)& theC3d, 
-                                                        const Handle(Geom2d_Curve) theC2d, 
+                                                        const Handle(Geom2d_Curve)& theC2d, 
                                                         const Handle(Geom_Surface)& theS,
                                                         const Standard_Real theF,
                                                         const Standard_Real theL);
index d36202ab25e7222324204ccb228d4e54e6b0d69f..31b59b571a2cb42b7ffb98cf4166b25221c6b42c 100644 (file)
@@ -462,7 +462,7 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
 //              itm.More(); ) {
               if(!M.IsBound(aexp.Current()))
                  continue;
-              TopoDS_Shape ae = aexp.Current();
+              const TopoDS_Shape& ae = aexp.Current();
               TopoDS_Shape as = M.Find(ae);
              if (as.IsSame(oldShell)) {
                // update the orientation of free edges in SH.
index 7b282a98501910b8e092ae4d6c22d9f2b5424e92..0567d42bd3156eab7cc9604c413cab93777aa370 100644 (file)
@@ -388,7 +388,7 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
   // apply recorded modifications to subshapes
   Standard_Boolean isEmpty = Standard_True;
   for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
-    TopoDS_Shape sh = it.Value();
+    const TopoDS_Shape& sh = it.Value();
     newsh = Apply ( sh, until );
     if ( newsh != sh ) {
       if ( myStatus & EncodeStatus(4)) //ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
@@ -408,7 +408,7 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
     }
     Standard_Integer nitems = 0;
     for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
-      TopoDS_Shape subsh = subit.Value();
+      const TopoDS_Shape& subsh = subit.Value();
       if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about abcense internal vertices after sewing.
       else locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
     }
index 5f3133fc8ff7bb24b2b78da5cded36827c186102..c4f76cb668a49c595cfb7682814f8aef9c93ae7a 100644 (file)
@@ -215,7 +215,7 @@ static Standard_Boolean IsInFace(const TopoDS_Edge& E,
 //purpose  : 
 //=======================================================================
 
-static void KPartCurve3d(TopoDS_Edge           Edge,
+static void KPartCurve3d(const TopoDS_Edge&           Edge,
                         Handle(Geom2d_Curve)  Curve,
                         Handle(Geom_Surface)  Surf)
 {
@@ -1420,12 +1420,12 @@ Standard_Integer BiTgte_Blend::NbBranches()
   exp.Init(Shells,TopAbs_SHELL);
   for (; exp.More(); exp.Next()) {
     // CurS = the current Shell.
-    const TopoDS_Shape CurS = exp.Current();
+    const TopoDS_Shape& CurS = exp.Current();
 
     TopExp_Explorer exp2(CurS, TopAbs_FACE);
     for (; exp2.More(); exp2.Next()) {
       // CurF = the current face of the current Shell.
-      const TopoDS_Shape CurF = exp2.Current();
+      const TopoDS_Shape& CurF = exp2.Current();
 
       for ( i = 1; i <= NbFaces; i++) {
        const TopoDS_Shape& Center = myCenters(i);
index 876a4a501be90747ae2b822f1906a3e36c0006cc..47911ac581094543d110f2b6b0bf9d0a850e58b9 100644 (file)
@@ -217,8 +217,8 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)&    CBis1,
                                   const Standard_Real            Tol,
                                   const Standard_Boolean         ComunElement) 
 {
-  Handle(Geom2d_Curve)   Bis1 = CBis1;
-  Handle(Geom2d_Curve)   Bis2 = CBis2;
+  const Handle(Geom2d_Curve)&   Bis1 = CBis1;
+  const Handle(Geom2d_Curve)&   Bis2 = CBis2;
 
   Handle(Standard_Type)  Type1 = Bis1->DynamicType();
   Handle(Standard_Type)  Type2 = Bis2->DynamicType();
index 9efef9145323f315fc9daf7945959091ecb477d0..c4abc6d988656bcba6e77549c0b26d32b663982b 100644 (file)
@@ -620,7 +620,7 @@ TCollection_ExtendedString CDM_Document::Folder() const {
 
 void CDM_Document::SetRequestedFolder(const TCollection_ExtendedString& aFolder)
 {
-  TCollection_ExtendedString f(aFolder);
+  const TCollection_ExtendedString& f = aFolder;
   if(f.Length() != 0) {
     myRequestedFolderIsDefined=Standard_True;
     myRequestedFolder=aFolder;
@@ -975,8 +975,8 @@ void CDM_Document::RemoveFromReference(const Standard_Integer aReferenceIdentifi
 //purpose  : 
 //=======================================================================
 
-TCollection_ExtendedString GetResource (const TCollection_ExtendedString aFormat,
-                                        const TCollection_ExtendedString anItem)
+TCollection_ExtendedString GetResource (const TCollection_ExtendedString& aFormat,
+                                        const TCollection_ExtendedString& anItem)
 {
   TCollection_ExtendedString theResource;
   theResource+= aFormat;
index 5d12686ec6b02df9220b1a986f8260a83a0c926a..7ca33424ce068e665c067adca6ca93d33aa3a1be 100644 (file)
@@ -681,7 +681,7 @@ gp_Pnt ComputePoint(const TopoDS_Vertex& V,const TopoDS_Edge& E,
       p = BRep_Tool::Pnt(v2);
     }     
 
-    GeomAdaptor_Curve cc = c.Curve();
+    const GeomAdaptor_Curve& cc = c.Curve();
     if (p.Distance(c.Value(first)) <= Precision::Confusion()) {
       GCPnts_AbscissaPoint computePoint(cc, D, first);
       Param = computePoint.Parameter();
index f93ed7c1d1059f0650b0b4896de30766ce3be7fe..f5ae1e87a8a257c5cd231f3445ac1daa7f550976 100644 (file)
@@ -180,7 +180,7 @@ static Standard_Boolean IsRadiusIntersected(const Handle(Geom2d_Curve)& theCurve
     if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), Precision::Angular())) 
       return Standard_True;
   }
-  Handle(Geom2d_Curve) aCurve = theCurve;
+  const Handle(Geom2d_Curve)& aCurve = theCurve;
   for(a = anInter.NbSegments(); a > 0; a--) 
   {
     //anInter.Segment(a, aCurve); //not implemented (bug in OCC)
index 82d87ebd62935409cb3524729d286991056eaa1d..702b83b1de6d32edb2f22c3b005393efc28bcfe1 100644 (file)
@@ -274,8 +274,8 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
   Standard_Real par = 0.691254*first + 0.308746*last;
 
   gp_Pnt pt, pt1, pt2; gp_Vec tgE, tgE1, tgE2, ns1, ns2, dint1, dint2;
-  TopoDS_Face F1 = S1.Face();
-  TopoDS_Face F2 = S2.Face();
+  const TopoDS_Face& F1 = S1.Face();
+  const TopoDS_Face& F2 = S2.Face();
   //F1.Orientation(TopAbs_FORWARD);
   //F2.Orientation(TopAbs_FORWARD);
   
index 54b793e277b7e8f72551619ebe8863acdf4235e6..f41848269652830407ea24da5162228e89472a9d 100644 (file)
@@ -426,7 +426,6 @@ void  ChFi3d_Builder::Compute()
            if (letype == TopAbs_SHELL){
              TopExp_Explorer expsh2(its.Value(),TopAbs_SHELL);
              const TopoDS_Shape& cursh = expsh2.Current();
-             TopoDS_Shape tt = cursh;
              B1.Add(myShapeResult,cursh);
              its.Next();
            }
index 3355704b5b7f480e150147dbd2e477eabf2f9515..7da5da1359013843d17f6c84b66ed86a94cf9813 100644 (file)
@@ -151,8 +151,8 @@ static TopoDS_Edge MakeOffsetEdge(const TopoDS_Edge&         theEdge,
 {
   TopoDS_Edge OffsetEdge;
   
-  TopoDS_Face F1 = S1.Face();
-  TopoDS_Face F2 = S2.Face();
+  const TopoDS_Face& F1 = S1.Face();
+  const TopoDS_Face& F2 = S2.Face();
   Handle(Geom_Surface) GS1 = BRep_Tool::Surface(F1);
   Handle(Geom_Surface) TrGS1 =
     new Geom_RectangularTrimmedSurface(GS1,
index d943534185275c714af2f639edd46c8d92591922..38129ffcf88dd2a89fc07e36aaa4b29c3b81a2df 100644 (file)
@@ -242,7 +242,7 @@ static Standard_Boolean IsObst(const ChFiDS_CommonPoint& CP,
 //           
 //=======================================================================
 
-static void CompParam(Geom2dAdaptor_Curve  Carc,
+static void CompParam(const Geom2dAdaptor_Curve&  Carc,
                      Handle(Geom2d_Curve) Ctg,
                      Standard_Real&       parc,
                      Standard_Real&       ptg,
@@ -330,8 +330,8 @@ static void CompParam(Geom2dAdaptor_Curve  Carc,
 static Standard_Boolean CompBlendPoint(const TopoDS_Vertex& V,
                                       const TopoDS_Edge& E,
                                       const Standard_Real W,
-                                      const TopoDS_Face F1,
-                                      const TopoDS_Face F2,
+                                      const TopoDS_Face& F1,
+                                      const TopoDS_Face& F2,
                                       Blend_Point& BP)
 {    
   gp_Pnt2d P1, P2;
index e974aca2fdf7b39243243f2d20f4d0220f58e4b7..5ad82754b886ca36301e37a467d5309718b502b7 100644 (file)
@@ -484,8 +484,8 @@ static void CalculDroite(const gp_Pnt2d & p2d1,
 //purpose  : calcule a batten between curves 2d  curv2d1 and curv2d2 at points p2d1 and p2d2  
 //=======================================================================
 
-static void CalculBatten (const Handle (GeomAdaptor_Surface) ASurf, 
-                          const TopoDS_Face Face ,
+static void CalculBatten (const Handle (GeomAdaptor_Surface)& ASurf, 
+                          const TopoDS_Face& Face ,
                           const Standard_Real xdir,
                           const Standard_Real  ydir,
                           const gp_Pnt2d & p2d1,
index f17b400060edaa71f2133f9aa0feca8444376144..f7df34a0a566d1256a91fd326deeafaf31c952c2 100644 (file)
@@ -539,7 +539,7 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr,
                    const Standard_Boolean      isFirst,
                    const Standard_Integer      ons,
                    const Standard_Real         pitol,
-                   const TopoDS_Vertex         bout)
+                   const TopoDS_Vertex&         bout)
      
 {  
   Standard_Integer opp = 3 - ons;
index 9fc4e74a2dc2de6b48b7ccfd42c3534680d7425d..2dba7ae0d721ce6616cae4434cb1b0346ab25a81 100644 (file)
@@ -1134,17 +1134,17 @@ static Standard_Integer setFlags(Draw_Interpretor& ,
 
   setProp(Sh, a, n);
   for (ex.Init (Sh,TopAbs_VERTEX); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
   for (ex.Init (Sh,TopAbs_EDGE); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
   for (ex.Init (Sh,TopAbs_FACE); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
index d189c160ed8090f50fe8c0c7cff438e7c2914a0b..71a276d5700b8c4974be93a5166f8c0f972cfdf6 100644 (file)
@@ -291,14 +291,14 @@ static Standard_Integer  DDF_CheckAttrs (Draw_Interpretor& di,Standard_Integer n
 //      std::cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<std::endl;
       const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap
       for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
-       Handle(TDF_Attribute) sAtt = attMItr.Key();
+       const Handle(TDF_Attribute)& sAtt = attMItr.Key();
 //     std::cout<<"\t\tSource references attribute dynamic type = "<<sAtt->DynamicType()<<std::endl;
        for (TDF_AttributeIterator itr2(TARGET); itr2.More(); itr2.Next()) {
          itr2.Value()->References(ds2);
 //       std::cout<<"\t\t\tTARGET attribute dynamic type = "<<itr2.Value()->DynamicType()<<std::endl;
          const TDF_AttributeMap& attMap2 = ds2->Attributes(); //attMap
          for (TDF_MapIteratorOfAttributeMap attMItr2(attMap2);attMItr2.More(); attMItr2.Next()) {
-           Handle(TDF_Attribute) tAtt = attMItr2.Key();
+           const Handle(TDF_Attribute)& tAtt = attMItr2.Key();
 //         std::cout<<"\t\t\t\tTarget reference attribute dynamic type = "<<tAtt->DynamicType()<<std::endl;
            if (tAtt->IsInstance(sAtt->DynamicType()))
              if(tAtt == sAtt) {
@@ -350,7 +350,7 @@ static Standard_Integer  DDF_CheckLabel (Draw_Interpretor& di,Standard_Integer n
       di<<"\tSource Attribute dynamic type = " << itr.Value()->DynamicType()->Name() << "\n";
       const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap
       for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
-       Handle(TDF_Attribute) sAtt = attMItr.Key();
+       const Handle(TDF_Attribute)& sAtt = attMItr.Key();
        TCollection_AsciiString entry;
        TDF_Tool::Entry(sAtt->Label(), entry);
        //std::cout<<"\t\tReferences attribute dynamic type = "<<sAtt->DynamicType()<<",\tLabel = "<<entry<<std::endl;
index 03a058eee233f1e0ae535ff8f9874f21d6c190d9..dc3a70927f1a3f1c44b83236ceed4a9ffdaef340 100644 (file)
@@ -3382,7 +3382,7 @@ static Standard_Integer DDataStd_GetNDIntegers (Draw_Interpretor& di,
     const TColStd_DataMapOfStringInteger& aMap = anAtt->GetIntegersContainer();
     TColStd_DataMapIteratorOfDataMapOfStringInteger itr(aMap);
     for (; itr.More(); itr.Next()){
-      TCollection_ExtendedString aKey(itr.Key());
+      const TCollection_ExtendedString& aKey(itr.Key());
       Standard_Integer aValue = itr.Value();
       di << "Key = " << aKey << " Value = " << aValue << "\n";
       }
@@ -3500,7 +3500,7 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di,
     const TDataStd_DataMapOfStringReal& aMap = anAtt->GetRealsContainer();
     TDataStd_DataMapIteratorOfDataMapOfStringReal itr(aMap);
     for (; itr.More(); itr.Next()){
-      TCollection_ExtendedString aKey(itr.Key());
+      const TCollection_ExtendedString& aKey(itr.Key());
       Standard_Real aValue = itr.Value();
       di << "Key = " << aKey << " Value = " << aValue << "\n";
       }
@@ -3757,7 +3757,7 @@ static Standard_Integer DDataStd_GetNDBytes (Draw_Interpretor& di,
     TDataStd_DataMapIteratorOfDataMapOfStringByte itr(aMap);
     for (; itr.More(); itr.Next())
     {
-      TCollection_ExtendedString aKey(itr.Key());
+      const TCollection_ExtendedString& aKey(itr.Key());
       Standard_Byte aValue = itr.Value();
       std::cout << "Key = "  << aKey << " Value = " <<aValue<<std::endl;
     }
@@ -3882,9 +3882,9 @@ static Standard_Integer DDataStd_GetNDIntArrays (Draw_Interpretor& di,
     const TDataStd_DataMapOfStringHArray1OfInteger& aMap = anAtt->GetArraysOfIntegersContainer();
     TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger itr(aMap);
     for (; itr.More(); itr.Next()){
-      TCollection_ExtendedString aKey(itr.Key());
+      const TCollection_ExtendedString& aKey(itr.Key());
       std::cout << "Key = "  << aKey<< std::endl;
-      Handle(TColStd_HArray1OfInteger) anArrValue = itr.Value();      
+      const Handle(TColStd_HArray1OfInteger)& anArrValue = itr.Value();      
       if(!anArrValue.IsNull()) {
         Standard_Integer lower = anArrValue->Lower();
         Standard_Integer upper = anArrValue->Upper();
@@ -4025,9 +4025,9 @@ static Standard_Integer DDataStd_GetNDRealArrays (Draw_Interpretor& di,
     const TDataStd_DataMapOfStringHArray1OfReal& aMap = anAtt->GetArraysOfRealsContainer();
     TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal itr(aMap);
     for (; itr.More(); itr.Next()){
-      TCollection_ExtendedString aKey(itr.Key());
+      const TCollection_ExtendedString& aKey(itr.Key());
       std::cout << "Key = "  << aKey << std::endl;
-      Handle(TColStd_HArray1OfReal) anArrValue = itr.Value();      
+      const Handle(TColStd_HArray1OfReal)& anArrValue = itr.Value();      
       if(!anArrValue.IsNull()) {
         Standard_Integer lower = anArrValue->Lower();
         Standard_Integer upper = anArrValue->Upper();
index 543130f15326865583e36ec0aad4f05712101414..c83b67542be37b754eab7a1aa289eababfd8b4ef 100644 (file)
@@ -155,7 +155,7 @@ static Standard_Integer DDocStd_fsdwrite(Draw_Interpretor& theDI,
   StdObjMgt_TransientPersistentMap aMap;
   for (Standard_Integer i = 1; i <= aShapes.Length(); ++i)
   {
-    TopoDS_Shape aShape = aShapes.Value(i);
+    const TopoDS_Shape& aShape = aShapes.Value(i);
 
     Handle(ShapePersistent_TopoDS::HShape) aPShape =
       ShapePersistent_TopoDS::Translate(aShape, aMap, ShapePersistent_WithTriangle);
index 091fde72d653665f987c32c0ff45aed884494ee6..45bac0b135c6cd47a18a204890d1ab56f148c11a 100644 (file)
@@ -457,7 +457,7 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat,
     const TCollection_AsciiString& aVendorName = aVendorIter.Key();
     if (!theVendorPriority.Contains(aVendorName))
     {
-      Handle(DE_ConfigurationNode) aNode = aVendorIter.Value();
+      const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value();
       if (theToDisable)
       {
         aNode->SetEnabled(Standard_False);
index b6a9dce17491476fd639643a3415f906e56477fc..94bf9461848eba11ce564428d3e84ac10d0ba8d9 100644 (file)
@@ -263,13 +263,13 @@ static void LoadC0Edges(const TopoDS_Shape& S,
   TopExp_Explorer anEx(S,TopAbs_EDGE); // mpv: new explorer iterator because we need keep edges order
   for(;anEx.More();anEx.Next()) {
     Standard_Boolean aC0 = Standard_False;
-    TopoDS_Shape anEdge1 = anEx.Current();
+    const TopoDS_Shape& anEdge1 = anEx.Current();
     if (edgeNaborFaces.IsBound(anEdge1)) {
       const TopTools_ListOfShape& aList1 = edgeNaborFaces.Find(anEdge1);
       if (aList1.Extent()<2) continue; // mpv (06.09.2002): these edges already was loaded
       TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(edgeNaborFaces);
       for (; itr.More(); itr.Next()) {
-       TopoDS_Shape anEdge2 = itr.Key();
+       const TopoDS_Shape& anEdge2 = itr.Key();
        if(anEdgesToDelete.Contains(anEdge2)) continue;
        if (anEdge1.IsSame(anEdge2)) continue;
        const TopTools_ListOfShape& aList2 = itr.Value();
@@ -875,7 +875,6 @@ Standard_Boolean DNaming::ComputeSweepDir (const TopoDS_Shape& theShape,
                                                   gp_Ax1& theAxis)
 {
   // Find surface
-  TopLoc_Location aLocation = theShape.Location();    
   Handle(Geom_Plane) aPlane;
 
   if (theShape.ShapeType() == TopAbs_FACE) {
index b5722518f2dc5e9627c7960c19238714dc26c144..c90581d583eb72d68512795e1d6b234711124563 100644 (file)
@@ -451,7 +451,7 @@ void FindSPErrorEdges(const TopoDS_Shape&         theShape,
     TopExp_Explorer anExpE(theShape, TopAbs_EDGE);
     
     for(; anExpE.More(); anExpE.Next()) {
-      Handle(BRepCheck_Result) aResult = theAnalyzer.Result(anExpE.Current());
+      const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(anExpE.Current());
 
       if(aResult.IsNull() || theMap.Contains(anExpE.Current()))
        continue;
@@ -474,7 +474,7 @@ void FindSPErrorEdges(const TopoDS_Shape&         theShape,
     }
   }
   else if(theShape.ShapeType() == TopAbs_EDGE) {
-    Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape);
+    const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape);
     itl.Initialize(aResult->Status());
     
     for(; itl.More(); itl.Next()) {
@@ -503,7 +503,7 @@ Standard_Boolean FindOtherErrors(const TopoDS_Shape&               theShape,
     if(FindOtherErrors(anIt.Value(), theAnalyzer, theMap))
       return Standard_True;
   }
-  Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape);
+  const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape);
   
   if (!aResult.IsNull()) {
 
@@ -518,7 +518,7 @@ Standard_Boolean FindOtherErrors(const TopoDS_Shape&               theShape,
          TopExp_Explorer anExpE(anExpF.Current(), TopAbs_EDGE);
 
          for(; anExpE.More(); anExpE.Next()) {
-           Handle(BRepCheck_Result) aResultE = theAnalyzer.Result(anExpE.Current());
+           const Handle(BRepCheck_Result)& aResultE = theAnalyzer.Result(anExpE.Current());
 
            if(aResultE.IsNull())
              continue;
index b7f6b081c07626618a7f9e8b8e8f19026ef22d0c..eed3de3f0215bf80e7a24fff6ea6009a2d3b812e 100644 (file)
@@ -1672,7 +1672,7 @@ static Standard_Boolean MakeSelection (const Handle(TDataStd_UAttribute)& Obj,
     if(aNode.IsNull())
       aNode = TDataStd_TreeNode::Set(Obj->Label());
     aNode->Remove();
-    Handle(TDataStd_UAttribute) aContainer = ContextObj;
+    const Handle(TDataStd_UAttribute)& aContainer = ContextObj;
     if(aContainer->Label().FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), RNode))
       RNode->Append(aNode);
     TDataStd_Name::Set(Obj->Label(), "Auxiliary_Object");
index 288d827501509f816884644fc9c55ef9087f89b2..269ab68d728c7589b616be6c105a619fd3f66d7d 100644 (file)
@@ -150,7 +150,7 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM
 #endif
          TDF_Tool::OutReferences(aLabel,anExtMap);
          for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) {
-        Handle(TDF_Attribute) att = attMItr.Key();
+        const Handle(TDF_Attribute)& att = attMItr.Key();
 #ifdef OCCT_DEBUG_SELN
         TDF_Tool::Entry(att->Label(), entr1);
            std::cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<std::endl;
index 6e3b02b6822f59433e548791b10dffc84a9a41d9..0d55b9ffac65a4172fbdbf2520dc0b5c405f347a 100644 (file)
@@ -122,7 +122,7 @@ static Standard_Integer DNaming_TCopyShape (Draw_Interpretor& di,
 
     DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName);
     for(;itrn.More();itrn.Next()) {
-      TCollection_AsciiString name = itrn.Value();
+      const TCollection_AsciiString& name = itrn.Value();
       const TopoDS_Shape Result = TR.Copied(itrn.Key());
       DBRep::Set(name.ToCString(), Result);
       di.AppendElement(name.ToCString());
index f965a8648edb223c630c7c457d69cd5c24f951fa..ecbc035bc071d23c200ae1d526301e2b08368dff 100644 (file)
@@ -1066,7 +1066,7 @@ void Draft_Modification::Perform ()
               {
                 for (i = 1; i <= i2s.NbLines(); i++)
                 {
-                  Handle( Geom_Curve ) aCurve = i2s.Line(i);
+                  const Handle( Geom_Curve )& aCurve = i2s.Line(i);
                   gp_Pnt Pnt = aCurve->Value( aCurve->FirstParameter() );
                   GeomAPI_ProjectPointOnSurf projector( Pnt, S1, Precision::Confusion() );
                   Standard_Real U, V;
index a4dfc746d814e9b53b41d6b70809c45ddaae717a..eebf8d5e7701ba57c6072fa40122485fa9174558 100644 (file)
@@ -115,7 +115,7 @@ static void resolveKeys (Draw_MapOfAsciiString& theMap,
   for (Standard_Integer j = 1; j <= aMapExtent; ++j)
   {
     TCollection_AsciiString aValue;
-    const TCollection_AsciiString aResource = theMap.FindKey (j);
+    const TCollection_AsciiString& aResource = theMap.FindKey (j);
     if (theResMgr->Find (aResource, aValue))
     {
     #ifdef OCCT_DEBUG
@@ -204,7 +204,7 @@ static Standard_Integer Pload (Draw_Interpretor& theDI,
   const Standard_Integer aMapExtent = aMap.Extent();
   for (Standard_Integer aResIter = 1; aResIter <= aMapExtent; ++aResIter)
   {
-    const TCollection_AsciiString aResource = aMap.FindKey (aResIter);
+    const TCollection_AsciiString& aResource = aMap.FindKey (aResIter);
   #ifdef OCCT_DEBUG
     std::cout << "aResource = " << aResource << std::endl;
   #endif
index de5dc5f3a7c9a266fb934e3403f7931e96189510..47f25feea0f4cc8c23303fea4b197026c9390884 100644 (file)
@@ -60,9 +60,9 @@ Geom2dGcc_Circ2d2TanOn::
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
@@ -392,8 +392,8 @@ Geom2dGcc_Circ2d2TanOn::
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
@@ -581,7 +581,7 @@ Geom2dGcc_Circ2d2TanOn::
   parcen3(1,8)
 {
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
index 55336cd6877e7532b446e21780ab2a6c3c43eba8..961914a5a1ef0d0648f38798288842046dba9fdd 100644 (file)
@@ -70,8 +70,8 @@ Geom2dGcc_Circ2d2TanRad::
   else {
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
     Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
-    Handle(Geom2d_Curve) CC2 = C2.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& CC2 = C2.Curve();
     GeomAbs_CurveType Type1 = C1.GetType();
     GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -276,7 +276,7 @@ Geom2dGcc_Circ2d2TanRad::
   if (Radius < 0.) { throw Standard_NegativeValue(); }
   else {
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
     GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index 666a977b0c6c4efba56b1a671949f25e0b49b6c1..fc407c1a915e817d2bf3288e20e2c992b887e7ad 100644 (file)
@@ -58,9 +58,9 @@ Geom2dGcc_Circ2d3Tan::
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
   Geom2dAdaptor_Curve C3 = Qualified3.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
-  Handle(Geom2d_Curve) CC3 = C3.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC3 = C3.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
   GeomAbs_CurveType Type3 = C3.GetType();
@@ -266,8 +266,8 @@ Geom2dGcc_Circ2d3Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -383,7 +383,7 @@ Geom2dGcc_Circ2d3Tan::
   pararg3(1,16)  
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index 5995429e389d0c36c541901214df80625708bfbf..613cd6e8bdd16d5801a8883042bf463df45d55d1 100644 (file)
@@ -42,7 +42,7 @@ Geom2dGcc_Circ2dTanCen::
   pararg1(1,2)  
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index a95e2bf171a999a08211fd50eb15366aea35f4b5..9b5921f16b401e5ce1bd1711bb19fa3116255b37 100644 (file)
@@ -53,8 +53,8 @@ Geom2dGcc_Circ2dTanOnRad::
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
     GeomAbs_CurveType Type1 = C1.GetType();
     GeomAbs_CurveType Type2 = OnCurve.GetType();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
-    Handle(Geom2d_Curve) Con = OnCurve.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
@@ -163,7 +163,7 @@ Geom2dGcc_Circ2dTanOnRad::
   else {
     gp_Pnt2d point1(Point1->Pnt2d());
     GeomAbs_CurveType Type2 = OnCurve.GetType();
-    Handle(Geom2d_Curve) Con = OnCurve.Curve();
+    const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
index 14ad20d0207b99376334284878a7e2e87e79912a..be6e855b75756d3875c92e77fbea8272e79df787 100644 (file)
@@ -46,8 +46,8 @@ Geom2dGcc_Lin2d2Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -127,7 +127,7 @@ Geom2dGcc_Lin2d2Tan::
   pararg2(1,2)   
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
@@ -196,8 +196,8 @@ Geom2dGcc_Lin2d2Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -260,7 +260,7 @@ Geom2dGcc_Lin2d2Tan::
   pararg2(1,2)   
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index 560614e6c78e557b14db326a7fd02af7b4a55334..95a0937a6fb114f8aa898f226cd7d9a13203aa58 100644 (file)
@@ -45,7 +45,7 @@ Geom2dGcc_Lin2dTanObl::
   pararg2(1,2)
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
@@ -111,7 +111,7 @@ Geom2dGcc_Lin2dTanObl::
   pararg2(1,2)
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index 4a6a8c125a711de8207885e8907c530612c5a539..28d052d8a0856fddf0cbb6b415fb4921b2a85bf1 100644 (file)
@@ -558,7 +558,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom
 
 Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)& theSurf,
   const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
-  const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol)
+  const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol)
 {
   GeomAdaptor_Surface aGAS(theNewSurf);
   GeomAbs_SurfaceType aSType = aGAS.GetType();
index ee333f54aa8e8f7109df34fb42c89d6b2cb0c394..1ebfa63fd76eec87b63a508de65030169f1a0574 100644 (file)
@@ -115,7 +115,7 @@ private:
 
   static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf,
     const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
-    const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast());
+    const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol = RealLast());
 
 
 
index 2f9c759747ef742e884007f4919213eee54a1a89..8362ab26220b39715d06d42c85dd5dcf12fae41c 100644 (file)
@@ -87,7 +87,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
   Standard_Boolean no_sing = Standard_True;
   Seq2.Clear();
 
-  Handle(Geom_Curve) C1 = Seq1.Value(1);
+  const Handle(Geom_Curve)& C1 = Seq1.Value(1);
   Standard_Real f = C1->FirstParameter(), l = C1->LastParameter();
   Standard_Integer iP, NP = 21;
   TColgp_Array1OfPnt Tab(1,NP);
@@ -125,7 +125,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
 
   for (Standard_Integer iseq=2; iseq<=Seq1.Length(); iseq++) {
     // discretisation de C2
-    Handle(Geom_Curve) C2 = Seq1.Value(iseq);
+    const Handle(Geom_Curve)& C2 = Seq1.Value(iseq);
     f = C2->FirstParameter();
     l = C2->LastParameter();
     u = f;
index fcb2305344361980c7d885f403d518fcec2e601c..d6d120129ca5bef475a2669f4f5505963bef7226 100644 (file)
@@ -2816,7 +2816,7 @@ static Standard_Boolean CompareWeightPoles(const TColgp_Array1OfPnt& thePoles1,
 //function : isIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
                                      Standard_Boolean&                theIsU,
                                      Standard_Real&                   theParam,
                                      Standard_Boolean&                theIsForward)
@@ -2896,8 +2896,8 @@ Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
 //function : buildC3dOnIsoLine
 //purpose  :
 //=============================================================================
-Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
-                                               const Handle(Adaptor3d_Surface) theSurf,
+Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+                                               const Handle(Adaptor3d_Surface)& theSurf,
                                                const Standard_Real              theFirst,
                                                const Standard_Real              theLast,
                                                const Standard_Real              theTolerance,
index 71e817bb9042ddad0cc67b88774e850616e2cd06..a3a13fb96ab2a0a370996e087ec7b64812740c6b 100644 (file)
@@ -239,7 +239,7 @@ public:
   //! @param theParam     Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 2d curve is a line and Standard_False otherwise.
-  Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
                                                      Standard_Boolean&                theIsU,
                                                      Standard_Real&                   theParam,
                                                      Standard_Boolean&                theIsForward);
@@ -251,8 +251,8 @@ public:
   //! @param theParam Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 3d curve is built and Standard_False otherwise.
-  Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
-                                                               const Handle(Adaptor3d_Surface) theSurf,
+  Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+                                                               const Handle(Adaptor3d_Surface)& theSurf,
                                                                const Standard_Real              theFirst,
                                                                const Standard_Real              theLast,
                                                                const Standard_Real              theTolerance,
index 9d7bca0230a21c6be7df2b1d3a59c19ff26440d7..fa50eb6314fad90b8326bfc49ddb5a200f5fb480 100644 (file)
@@ -49,7 +49,7 @@ GeomToStep_MakeRectangularTrimmedSurface::
     done = Standard_False;
     return;
   }
-  Handle(StepGeom_Surface) StepSurf = mkSurf.Value();
+  const Handle(StepGeom_Surface)& StepSurf = mkSurf.Value();
 
   Standard_Real U1,U2,V1,V2;
   RTSurf->Bounds(U1, U2, V1, V2);
index 8e742ae69188a8ccb65a294f264a20b4489cb33c..0624ec4f59457579abd89d42db1e7e7a2939dda5 100644 (file)
@@ -363,7 +363,7 @@ static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const
 
   if (anApprox.IsDone())
   {
-    Handle(Geom_BSplineSurface) S = anApprox.Surface();
+    const Handle(Geom_BSplineSurface)& S = anApprox.Surface();
     DrawTrSurf::Set(a[1], S);
     di << a[1];
   }
@@ -445,7 +445,7 @@ static Standard_Integer surfint(Draw_Interpretor& di, Standard_Integer n, const
   }
   if (anApprox.IsDone())
   {
-    Handle(Geom_BSplineSurface) S = anApprox.Surface();
+    const Handle(Geom_BSplineSurface)& S = anApprox.Surface();
     DrawTrSurf::Set(a[1], S);
     di << a[1];
   }
index 4946ed3d8ad04824b6bd618b9cb008e087737ce6..c73ca5adfbc526cfa11d76a820d5c940e49a71d5 100644 (file)
@@ -543,7 +543,7 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const
         1.0e-5) ;
       anInterpolator.Perform() ;
       if (anInterpolator.IsDone()) { 
-        Handle(Geom_BSplineCurve) C = 
+        const Handle(Geom_BSplineCurve)& C = 
           anInterpolator.Curve();
         DrawTrSurf::Set(a[1], C);
       }
@@ -560,7 +560,7 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const
         1.0e-5);
       a2dInterpolator.Perform() ;
       if (a2dInterpolator.IsDone()) {
-        Handle(Geom2d_BSplineCurve) C = a2dInterpolator.Curve() ;
+        const Handle(Geom2d_BSplineCurve)& C = a2dInterpolator.Curve() ;
         DrawTrSurf::Set(a[1], C);
       }
     }
index 985692f00cba09e3682a861316ed6cf81109d957..59e0ee75a9f373e8d5ee4a256f20ed4629e3609f 100644 (file)
@@ -349,7 +349,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
 
   for (Graphic3d_MapOfStructure::Iterator aDispStructIter (myStructsDisplayed); aDispStructIter.More(); aDispStructIter.Next())
   {
-    Handle(Graphic3d_Structure) aStruct  = aDispStructIter.Key();
+    const Handle(Graphic3d_Structure)& aStruct  = aDispStructIter.Key();
     const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
     if (anAnswer != Graphic3d_TOA_COMPUTE)
     {
index 52c1c309f52e0c7e15e032479155b8d31be8a825..99fb33025c54889cfdca106bf9f474a94d9a98b7 100644 (file)
@@ -54,7 +54,7 @@ Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (unsigned char thePosXLocation,
 // function : Graphic3d_CubeMapOrder
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder)
+Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   myConvolution  (theOrder.Order.myConvolution),
   myHasOverflows (theOrder.Order.myHasOverflows)
@@ -135,7 +135,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault()
 // function : Permute
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCubeMapOrder thePermutation)
+Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (const Graphic3d_ValidatedCubeMapOrder& thePermutation)
 {
   for (unsigned char i = 0; i < 6; ++i)
   {
@@ -149,7 +149,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCube
 // function : Permuted
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (Graphic3d_ValidatedCubeMapOrder thePermutation) const
+Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (const Graphic3d_ValidatedCubeMapOrder& thePermutation) const
 {
   Graphic3d_CubeMapOrder anOrder = *this;
   anOrder.Permute (thePermutation);
index cbdeafc10dea8c78910835ecbef95eda3ca9d25c..a5cdeb82e678a9b81b172e8008146a44214d0ba0 100644 (file)
@@ -42,7 +42,7 @@ public:
                                           unsigned char theNegZLocation);
 
   //! Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder.
-  Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder);
+  Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder);
 
   //! Alias of 'operator='.
   Standard_EXPORT Graphic3d_CubeMapOrder& Set (const Graphic3d_CubeMapOrder& theOrder);
@@ -61,10 +61,10 @@ public:
   Standard_EXPORT Graphic3d_CubeMapOrder& SetDefault();
 
   //! Applies another cubemap order as permutation for the current one.
-  Standard_EXPORT Graphic3d_CubeMapOrder& Permute (Graphic3d_ValidatedCubeMapOrder anOrder);
+  Standard_EXPORT Graphic3d_CubeMapOrder& Permute (const Graphic3d_ValidatedCubeMapOrder& anOrder);
 
   //! Returns permuted by other cubemap order copy of current one. 
-  Standard_EXPORT Graphic3d_CubeMapOrder Permuted (Graphic3d_ValidatedCubeMapOrder anOrder) const;
+  Standard_EXPORT Graphic3d_CubeMapOrder Permuted (const Graphic3d_ValidatedCubeMapOrder& anOrder) const;
 
   //! Swaps values of two cubemap sides.
   Standard_EXPORT Graphic3d_CubeMapOrder& Swap (Graphic3d_CubeMapSide theFirstSide,
index 2f9e18015847253f24d25aae42f6e84fdcfabeea..df8e6f71af094416ac149d0e45ee7ed3730773c4 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap)
 // purpose  :
 // =======================================================================
 Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString&        theFilePath,
-                                                  const Graphic3d_ValidatedCubeMapOrder theOrder)
+                                                  const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   Graphic3d_CubeMap (theFilePath),
   myOrder           (theOrder),
@@ -36,7 +36,7 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString&
 // purpose  :
 // =======================================================================
 Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const Handle(Image_PixMap)&           theImage,
-                                                  const Graphic3d_ValidatedCubeMapOrder theOrder)
+                                                  const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   Graphic3d_CubeMap (Handle(Image_PixMap)()),
   myOrder           (theOrder),
index 41a4f94d7e96f6d8f29be98df288e69afbbee70e..ef7bbd50e521155a17629e2b415fb1953685dda5 100644 (file)
@@ -29,13 +29,13 @@ public:
   //! @theFileName - path to the cubemap image
   //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const TCollection_AsciiString&        theFileName,
-                                           const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+                                           const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
 
   //! Initialization to set cubemap directly by PixMap.
   //! @thePixMap - origin PixMap
   //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const Handle(Image_PixMap)&           theImage,
-                                           const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+                                           const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
 
   //! Returns current cubemap side as compressed PixMap.
   Standard_EXPORT virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
index a4e45a9b012145d3ae5f98a6bfe1b6c21f150a84..5abb44781f2c95d2267cab34af37a1e5c577ab7a 100644 (file)
@@ -137,7 +137,7 @@ Handle(Graphic3d_Structure) Graphic3d_StructureManager::Identification (const St
   Handle(Graphic3d_Structure) SGfound;
 
   for (; it.More() && notfound; it.Next()) {
-    Handle(Graphic3d_Structure) SG = it.Key();
+    const Handle(Graphic3d_Structure)& SG = it.Key();
     if ( SG->Identification () == AId) {
       notfound  = Standard_False;
       SGfound = SG;
@@ -165,7 +165,6 @@ void Graphic3d_StructureManager::RecomputeStructures()
   NCollection_Map<Graphic3d_Structure*> aStructNetwork;
   for (Graphic3d_MapIteratorOfMapOfStructure anIter(myDisplayedStructure); anIter.More(); anIter.Next())
   {
-    Handle(Graphic3d_Structure) aStructure = anIter.Key();
     anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
   }
 
index d3f9ed74806bb02dcf2a62751980e553b284884d..38480ab1fce40f01ee45cf058cc44ae81857bdc3 100644 (file)
 #include <gp_XYZ.hxx>
 #include <Standard_Dump.hxx>
 
+#include <cmath>
+
 Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) const
 {
-  return sqrt( (X() - AOther.X()) * (X() - AOther.X())
+  return std::sqrt( (X() - AOther.X()) * (X() - AOther.X())
                     + (Y() - AOther.Y()) * (Y() - AOther.Y())
                     + (Z() - AOther.Z()) * (Z() - AOther.Z()) );
 }
index f185c25b0fac69c0426d21c4f10be6e8fc91f7b3..06664da2e34297bda4a35393f11eadfb02fb0018 100644 (file)
@@ -64,7 +64,7 @@ IFGraph_Articulations::IFGraph_Articulations
 
   for (Interface_EntityIterator iter = thegraph.Shareds(thegraph.Entity(num));
        iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer nument  = thegraph.EntityNumber(ent);
     if (!thegraph.IsPresent(num)) {
       thegraph.GetFromEntity(ent,Standard_False);
index 519e3b2ff4416b3373d55d92b0c942983c3aba62..6b75fdf301a5582151d3b0f1a0bbab69c4af51eb 100644 (file)
@@ -35,7 +35,7 @@ IFGraph_ConnectedComponants::IFGraph_ConnectedComponants
   Interface_EntityIterator loaded = Loaded();
   Reset();
   for (loaded.Start(); loaded.More(); loaded.Next()) {
-    Handle(Standard_Transient) ent = loaded.Value();
+    const Handle(Standard_Transient)& ent = loaded.Value();
     if (IsInPart(ent)) continue;
     IFGraph_AllConnected connect(Model(),ent);
     AddPart();
index 26a04db16125158e6a455368505e985b3ffb46d1..3a5af1f5d6923cd207fb5a053ba4e210c43c5afa 100644 (file)
@@ -142,7 +142,7 @@ IFSelect_BasicDumper::IFSelect_BasicDumper ()  {  }
     return Standard_True;
   }
   if (type.IsEqual("IFSelect_SelectTextType")) {
-    const TCollection_AsciiString exname = file.ParamValue(1);
+    const TCollection_AsciiString& exname = file.ParamValue(1);
     if (exname.Length() < FIRSTCHAR) return Standard_False;
     if      (exname.Value(FIRSTCHAR) == 'e') {}
     else if (exname.Value(FIRSTCHAR) == 'c') {}
@@ -168,7 +168,7 @@ IFSelect_BasicDumper::IFSelect_BasicDumper ()  {  }
 
   if (type.IsEqual("IFSelect_TransformStandard")) {
     Standard_Boolean copyoption;
-    const TCollection_AsciiString copyname = file.ParamValue(1);
+    const TCollection_AsciiString& copyname = file.ParamValue(1);
     if (copyname.Length() < FIRSTCHAR) return Standard_False;
     if      (copyname.Value(FIRSTCHAR) == 'c') copyoption = Standard_True;
     else if (copyname.Value(FIRSTCHAR) == 'o') copyoption = Standard_False;
index 6c3802c4e51a4ff8388eb248348e6fb2edff5161..bcec09dfaf62fa6dccc008820dc34747fa84d91f 100644 (file)
@@ -72,7 +72,7 @@ void  IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list,
   for (list.Start(); list.More(); list.Next()) {
     num = list.Number();
     Handle(Standard_Transient) ent;
-    const Handle(Interface_Check) check = list.Value();
+    const Handle(Interface_Check)& check = list.Value();
     ent = check->Entity();
     if (ent.IsNull() && num > 0 && num <= nbe) ent = model->Value(num);
     nb = check->NbFails();
index 79ddb58d50fb557213028455ecbd7a1aaab2ea24..c98d4a1cc645c1137d51b6a560860b55f14bd6ea 100644 (file)
@@ -259,7 +259,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   Interface_CheckIterator checks;
   checks.SetName ("X-STEP WorkSession : Send All");
   Message::SendInfo() << "** WorkSession : Sending all data"<<std::endl;
-  Handle(Interface_InterfaceModel)  model = G.Model();
+  const Handle(Interface_InterfaceModel)&  model = G.Model();
   if (model.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
 
   Interface_CopyTool TC (model, protocol);
@@ -298,7 +298,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   Interface_CheckIterator checks;
   checks.SetName ("X-STEP WorkSession : Send Selected");
   Message::SendInfo() << "** WorkSession : Sending selected data"<<std::endl;
-  Handle(Interface_InterfaceModel)  original = G.Model();
+  const Handle(Interface_InterfaceModel)&  original = G.Model();
   if (original.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
   Handle(Interface_InterfaceModel) newmod  = original->NewEmptyModel();
   Interface_CopyTool TC (original, protocol);
@@ -361,7 +361,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
 //                             et aussi : pas de Dispatch (envoi en bloc)
 
   applied.Nullify();
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
   if (dispnum > 0) {
     newmod  = original->NewEmptyModel();
     TC.Clear();
@@ -441,7 +441,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   (const Interface_Graph& G, const Handle(IFSelect_WorkLibrary)& WL,
    Interface_CopyTool& TC,   Handle(Interface_InterfaceModel)& newmod)
 {
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
 //  Interface_CopyTool TC(original,protocol);
   newmod  = original->NewEmptyModel();
   TC.Clear();
index 2985948be738bf40da89db112611f3ebfc76fa6f..a7d945be1ef5c6eca2cebb21431c5c036dbbd769 100644 (file)
@@ -37,10 +37,9 @@ IFSelect_SelectExtract::IFSelect_SelectExtract ()
 {
   Interface_EntityIterator iter;
   Interface_EntityIterator inputer = InputResult(G);  // tient compte de tout
-  Handle(Interface_InterfaceModel) model = G.Model();
   Standard_Integer rank = 0;
   for (inputer.Start(); inputer.More(); inputer.Next()) {
-    Handle(Standard_Transient) ent = inputer.Value();
+    const Handle(Standard_Transient)& ent = inputer.Value();
     rank ++;
     if (SortInGraph(rank,ent,G) == thesort) iter.GetOneItem(ent);
   }
index 368a82bf0c6c4a9e16bdd5e8e672ebf1f5384e6a..8b59c52a20eb1e2cb562021df06c20a0496ff191 100644 (file)
@@ -55,7 +55,7 @@ IFSelect_SelectRootComps::IFSelect_SelectRootComps ()    {  }
 //  A present, on retient, parmi les inputs, celles comptees une seule fois
 //  (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle)
   for (inp1.Start(); inp1.More(); inp1.Next()) {
-    Handle(Standard_Transient) ent = inp1.Value();
+    const Handle(Standard_Transient)& ent = inp1.Value();
     if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
index a60c4e66538fe48c309553499af09c87b26ce462..32e517b43790f88313a030cf68118d63da7093a3 100644 (file)
@@ -38,12 +38,12 @@ IFSelect_SelectRoots::IFSelect_SelectRoots ()    {  }
 //  On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous
 //  niveaux). Les Roots initiales comptees une seule fois sont bonnes
   for (input.Start(); input.More(); input.Next()) {
-    Handle(Standard_Transient) ent = input.Value();
+    const Handle(Standard_Transient)& ent = input.Value();
     GC.GetFromEntity(ent);
   }
 //  A present, on retient, parmi les inputs, celles comptees une seule fois
   for (input.Start(); input.More(); input.Next()) {
-    Handle(Standard_Transient) ent = input.Value();
+    const Handle(Standard_Transient)& ent = input.Value();
     if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
index c19bc5d3200f8b2e20cdeb24264a7ba4cb06032f..95fe170c899ed5be0615772fd9f17cacb54aa535 100644 (file)
@@ -98,7 +98,7 @@ static Standard_Integer multsign
 {
   Standard_Boolean res;
   Standard_CString txt;
-  Handle(Interface_InterfaceModel) model = G.Model();
+  const Handle(Interface_InterfaceModel)& model = G.Model();
   if (theexact <= 0) {
     if (!thematcher.IsNull()) return thematcher->Matches (ent,model,thesigntext, (theexact < 0));
     txt = thecounter->ComputedSign(ent,G);
index 0fcc5ef743367991b3efabb3d174b2f31ee84625..e777c9f371b57ab75076cf6753bd53ec5e858217 100644 (file)
@@ -46,7 +46,7 @@ Standard_Boolean  IFSelect_Selection::HasUniqueResult () const
 //  On peut utiliser le Graphe a present
   Interface_Graph GG(G);
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     GG.GetFromEntity(ent,Standard_True);    // et voila
   }
   return Interface_GraphContent(GG); // EntityIterator specialise (meme taille)
index a56ab4a48f6d74898051a5b78b3bc9879dbfaf62..4075df788c685f64cd0e49f403b9d42a91773f1e 100644 (file)
@@ -212,7 +212,7 @@ IFSelect_SignatureList::IFSelect_SignatureList
     nbtot += nbent;
     nbsign ++;
     if (nbent > maxent) maxent = nbent;
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
 //    if (!name.IsIntegerValue()) continue;  pas bien fiable
     Standard_Integer ic, nc = name.Length();
     Standard_Boolean iaint = Standard_True;
index ab4572d3294b1ec75e8e08354bff484312080f44..cc35ac2ecf1e4db2f44d9003a0399eb465032e6d 100644 (file)
@@ -118,7 +118,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard ()
   (const Interface_Graph& G, Interface_CopyTool& TC,
    Handle(Interface_InterfaceModel)& newmod) const
 {
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
   newmod  = original->NewEmptyModel();
   TC.Clear();
   Standard_Integer nb = G.Size();
@@ -150,7 +150,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard ()
   Standard_Boolean res = Standard_True;
   Standard_Boolean chg = Standard_False;
   Standard_Integer nb = NbModifiers();
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
 
   for (Standard_Integer i = 1; i <= nb; i ++) {
     Handle(IFSelect_Modifier) unmod = Modifier(i);
index 0de1d2a60f1ae0bd02aac72d723c0fe7d1942eb0..27730d18e61898f164fcad32291dfd1d3a9de05b 100644 (file)
@@ -568,7 +568,7 @@ Standard_Boolean IFSelect_WorkSession::ComputeCheck
     BM.Init (Standard_False,Flag_Incorrect);
     Standard_Integer num, nb = CG.Size();
     for (checklist.Start(); checklist.More(); checklist.Next()) {
-      const Handle(Interface_Check) chk = checklist.Value();
+      const Handle(Interface_Check)& chk = checklist.Value();
       if (!chk->HasFailed()) continue;
       num = checklist.Number();
       if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect);
@@ -2707,7 +2707,7 @@ void IFSelect_WorkSession::QueryCheckList (const Interface_CheckIterator& chl)
   thecheckana = TCollection_AsciiString (nb+1,' ');
   for (chl.Start(); chl.More(); chl.Next()) {
     Standard_Integer num = chl.Number();
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->HasFailed())        thecheckana.SetValue(num,'2');
     else if (ach->HasWarnings()) thecheckana.SetValue(num,'1');
   }
@@ -3038,7 +3038,7 @@ void IFSelect_WorkSession::DumpSelection
   IFSelect_SelectionIterator iter; sel->FillIterator(iter);
   for (; iter.More(); iter.Next()) {
     nb ++; 
-    Handle(IFSelect_Selection) newsel = iter.Value();
+    const Handle(IFSelect_Selection)& newsel = iter.Value();
     sout<<" -- "<<newsel->Label()<<std::endl;
   }
   sout << " Nb Inputs:"<<nb<<std::endl;
@@ -3481,7 +3481,7 @@ void IFSelect_WorkSession::PrintCheckList (Standard_OStream& S,
 //  mode : 0  comptage   1 n0s entites   2 n0s+id ents
   if (mode == IFSelect_ItemsByEntity) checklist.Print (S,myModel,failsonly);
   else {
-    Interface_CheckIterator chks = checklist;
+    const Interface_CheckIterator& chks = checklist;
     Handle(IFSelect_CheckCounter) counter =
       new IFSelect_CheckCounter (mode>1 && mode != IFSelect_CountSummary);
     counter->Analyse (chks,myModel,Standard_True,failsonly);
@@ -3722,7 +3722,7 @@ void IFSelect_WorkSession::ListEntities
       if (!titre && mode == 0) sout<<"  Keys : R Root   ? Unknown   * Unloaded"<<std::endl;
       if (!titre && mode == 2) sout<<"(";
       titre = 1;
-      Handle(Standard_Transient) ent = iter.Value();
+      const Handle(Standard_Transient)& ent = iter.Value();
       Standard_Integer num = myModel->Number(ent);
       if (mode == 1) {
     // n0 id (root?) category validity tracetype
index fa8084ace0c863dabddf0b8c700465f4bca637e8..f5c82fd3e1ff38fa912f5ad8ca4aeb9fbd204b98 100644 (file)
@@ -94,7 +94,7 @@ void IGESCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the
 // function : setStatic
 // purpose  :
 //=======================================================================
-void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter)
+void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter)
 {
   Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity);
   Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode);
index 101234a414776e4dd205aaefdd7457a74626731a..2dc29a39357b5ab95b031c2358e269cba1f9a0c7 100644 (file)
@@ -139,7 +139,7 @@ private:
   void initStatic(const Handle(DE_ConfigurationNode)& theNode);
 
   //! Initialize static variables
-  void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter);
+  void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter);
 
   //! Reset used interface static variables
   void resetStatic();
index 86b083fe8346433ca94f0f6b5a0b70d108f7a095..bf8cfba272c8542663a562ef867c7f5d91a43f6f 100644 (file)
@@ -95,7 +95,7 @@ static void AddCompositeShape (const Handle(XCAFDoc_ShapeTool)& theSTool,
                                TopTools_MapOfShape& theMap)
 {
   TopoDS_Shape aShape = theShape;
-  TopLoc_Location aLoc = theShape.Location();
+  const TopLoc_Location& aLoc = theShape.Location();
   if (!theConsiderLoc && !aLoc.IsIdentity())
     aShape.Location( TopLoc_Location() );
   if (!theMap.Add (aShape)) 
index 706a3e93d7e6dbe2732acdfe42a5f6a4e72eee71..53059072c5a5ec1733674eda43d343f49a1dc452 100644 (file)
@@ -278,7 +278,7 @@ void IGESCAFControl_Writer::MakeColors (const TopoDS_Shape &S,
   // check if shape has its own style (or inherits from ancestor)
   XCAFPrs_Style style = inherit;
   if ( settings.Contains(S) ) {
-    XCAFPrs_Style own = settings.FindFromKey(S);
+    const XCAFPrs_Style& own = settings.FindFromKey(S);
     if ( own.IsSetColorCurv() ) style.SetColorCurv ( own.GetColorCurv() );
     if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurf() );
     style.SetMaterial (own.Material());
@@ -397,7 +397,7 @@ static void AttachLayer (const Handle(Transfer_FinderProcess) &FP,
   if ( aSh.ShapeType() == TopAbs_COMPOUND ) {
     TopoDS_Iterator aShIt(aSh);
     for ( ; aShIt.More(); aShIt.Next() ) {
-      TopoDS_Shape newSh = aShIt.Value();
+      const TopoDS_Shape& newSh = aShIt.Value();
       Handle(TColStd_HSequenceOfExtendedString) shLayers = new TColStd_HSequenceOfExtendedString;
       if (! LTool->GetLayers( newSh, shLayers) || newSh.ShapeType() == TopAbs_COMPOUND )
        AttachLayer(FP, LTool, newSh, localIntName);
@@ -413,7 +413,7 @@ static void AttachLayer (const Handle(Transfer_FinderProcess) &FP,
   }
   
   for (Standard_Integer i = 1; i <= shseq.Length(); i++ ) {
-    TopoDS_Shape localShape = shseq.Value(i);
+    const TopoDS_Shape& localShape = shseq.Value(i);
     Handle(IGESData_IGESEntity) Igesent;
     Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, localShape );
     if ( FP->FindTypedTransient ( mapper, STANDARD_TYPE(IGESData_IGESEntity), Igesent ) ) {
index d9346bb41546108da1915d494a49255122c481ce..93eb955eafaac4717ba9defc08125ff244fe4e2e 100644 (file)
@@ -149,7 +149,7 @@ void  IGESControl_Reader::PrintTransferInfo
       // Init for dicoCountResult for IFSelect_ResultCount
       if ( mode == IFSelect_ResultCount ) {
         char mess[300];
-        const Handle(Transfer_Binder) aBinder = iterTrans.Value();
+        const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
         sprintf(mess,"\t%s",aBinder->ResultTypeName());
         if (aMapCountResult.IsBound(mess))
           aMapCountResult.ChangeFind(mess)++;
@@ -159,7 +159,7 @@ void  IGESControl_Reader::PrintTransferInfo
       // Init for dicoCountMapping for IFSelect_Mapping
       else if ( mode == IFSelect_Mapping ) {
         char mess[300];
-        const Handle(Transfer_Binder) aBinder = iterTrans.Value();
+        const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
         DeclareAndCast(IGESData_IGESEntity,igesEnt,iterTrans.Starting());
 
         sprintf(mess,"%d\t%d\t%s\t%s", igesEnt->TypeNumber(), igesEnt->FormNumber(),
@@ -178,7 +178,7 @@ void  IGESControl_Reader::PrintTransferInfo
     // Init the dicoCount dicoList and nbWarn ,nb Fail.
     for(checkIterator.Start(); checkIterator.More(); checkIterator.Next() ) {
       char mess[300];
-      const Handle(Interface_Check) aCheck = checkIterator.Value(); 
+      const Handle(Interface_Check)& aCheck = checkIterator.Value(); 
       Handle(Standard_Transient) ent = model->Value(checkIterator.Number());
       DeclareAndCast(IGESData_IGESEntity,igesEnt,ent);
       Standard_Integer type = igesEnt->TypeNumber(), form = igesEnt->FormNumber();
@@ -242,7 +242,7 @@ void  IGESControl_Reader::PrintTransferInfo
         Message_Messenger::StreamBuffer aSender = TF->SendInfo();
         aSender << aMapCountIter.Value() << aMapCountIter.Key() << std::endl;
         if (mode == IFSelect_ListByItem) {
-          Handle(TColStd_HSequenceOfInteger) entityList = aMapListIter.Value();
+          const Handle(TColStd_HSequenceOfInteger)& entityList = aMapListIter.Value();
           Standard_Integer length = entityList->Length();
           Message_Msg msg3035("IGES_3035");
           TF->Send(msg3035, Message_Info);
index 69202744165959c9645a108b51dc37dc7d25f5e1..37158506e7ae09ed63fccc79d867e050e4a81ccb 100644 (file)
@@ -168,7 +168,7 @@ void  IGESData_GeneralModule::FillSharedCase
   if (enfr->NbAssociativities() != 0) {
     for (Interface_EntityIterator iter = enfr->Associativities();
         iter.More(); iter.Next()) {
-      Handle(Standard_Transient) anent = iter.Value();
+      const Handle(Standard_Transient)& anent = iter.Value();
       Handle(Standard_Transient) newent;
       if (TC.Search(anent,newent)) ento->AddAssociativity
        (GetCasted(IGESData_IGESEntity,newent));
index c58873a852ba055ea4390f521d916c88c637a407..7f17a73e288d736a598db8ccf71deecee672846b 100644 (file)
@@ -492,7 +492,7 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str,
   if (str.IsNull())
     {  ach->SendFail(Msg57);  return;  }
 
-  Handle(TCollection_HAsciiString) stdvar = str;
+  const Handle(TCollection_HAsciiString)& stdvar = str;
   if (strcmp(mess,"Last Change Date")==0)
     Msg57.Arg(25);
   else
index 3cf6d5a7c9971c7d7c1dfd92e741d70bbde51db9..8480f21b94e5a296850211d1b46e53827ba205d2 100644 (file)
@@ -200,7 +200,7 @@ void IGESDraw_ToolViewsVisible::OwnCheck
 {
   Standard_Integer res = 0;
   Standard_Integer nb = ent->NbDisplayedEntities();
-  Handle(IGESData_ViewKindEntity) entcomp (ent);
+  const Handle(IGESData_ViewKindEntity)& entcomp = ent;
   for (Standard_Integer i = 1; i <= nb; i ++) {
     Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
     if (entcomp != displayed->View()) res ++;
@@ -237,7 +237,7 @@ Standard_Boolean  IGESDraw_ToolViewsVisible::OwnCorrect
 //  Les entites affichees doivent referencer <ent>. Elles ont priorite.
   Standard_Boolean res = Standard_False;
   Standard_Integer nb = ent->NbDisplayedEntities();
-  Handle(IGESData_ViewKindEntity) entcomp (ent);
+  const Handle(IGESData_ViewKindEntity)& entcomp = ent;
   for (Standard_Integer i = 1; i <= nb; i ++) {
     Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
     if (entcomp != displayed->View()) res = Standard_True;
index ebfcfc813daaecbb1e3ad24914125fb89b106bbc..fdd813ca0c5accd82e240efce578e998f9f34ab2 100644 (file)
@@ -309,7 +309,7 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck
     if (ent->LineFontValue(i) != 0 && ent->IsFontDefinition(i)) ach->AddFail
       ("At least one Line Font Definition Mismatch (both Value and Entity");
   }
-  Handle(IGESData_ViewKindEntity) entcomp (ent);
+  const Handle(IGESData_ViewKindEntity)& entcomp = ent;
   Standard_Integer res = 0;
   nb = ent->NbDisplayedEntities();
   for (i = 1; i <= nb; i ++) {
@@ -380,7 +380,7 @@ Standard_Boolean  IGESDraw_ToolViewsVisibleWithAttr::OwnCorrect
 //  Les entites affichees doivent referencer <ent>. Elles ont priorite.
   Standard_Boolean res = Standard_False;
   Standard_Integer nb = ent->NbDisplayedEntities();
-  Handle(IGESData_ViewKindEntity) entcomp (ent);
+  const Handle(IGESData_ViewKindEntity)& entcomp = ent;
   for (Standard_Integer i = 1; i <= nb; i ++) {
     Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
     if (entcomp != displayed->View()) res = Standard_True;
index fa1a76ba7c00540db571ee323bcf5a39469b1574..7f1d782536b1d975bd9e3b31f928b84316c59104 100644 (file)
@@ -41,7 +41,7 @@ Standard_Integer  IGESSelect::WhatIges
   (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G,
    Handle(IGESData_IGESEntity)& /* sup */, Standard_Integer& /* index */)
 {
-  Handle(IGESData_IGESEntity) igesent = ent;
+  const Handle(IGESData_IGESEntity)& igesent = ent;
   if (igesent.IsNull()) return Standard_False;
 //  Standard_Integer igt = igesent->TypeNumber();
   DeclareAndCast(IGESData_IGESModel,model,G.Model());
index 8e8241fb19cde24a400b7873ab9231b3e6e307be..3cbfd8d94f3084476e33d098661ce7c8aec8922d 100644 (file)
@@ -156,7 +156,7 @@ IGESSelect_Dumper::IGESSelect_Dumper ()    {  }
   if (type.IsEqual("IGESSelect_SelectIGESTypeForm")) {
     if (file.NbParams() < 2) return Standard_False;
     //Standard_Boolean exact; //szv#4:S4163:12Mar99 not needed
-    const TCollection_AsciiString exname = file.ParamValue(1);
+    const TCollection_AsciiString& exname = file.ParamValue(1);
     if (exname.Length() < 1) return Standard_False;
     if      (exname.Value(1) == 'e') {} //szv#4:S4163:12Mar99 `exact = Standard_True` not needed
     else if (exname.Value(1) == 'c') {} //szv#4:S4163:12Mar99 `exact = Standard_False` not needed
@@ -201,7 +201,7 @@ IGESSelect_Dumper::IGESSelect_Dumper ()    {  }
     if (file.NbParams() < 2) return Standard_False;
     Handle(IGESSelect_FloatFormat) ff = new IGESSelect_FloatFormat;
     Standard_Boolean zerosup;
-    const TCollection_AsciiString zsup = file.ParamValue(1);
+    const TCollection_AsciiString& zsup = file.ParamValue(1);
     if (zsup.Length() < 1) return Standard_False;
     if      (zsup.Value(1) == 'z') zerosup = Standard_True;
     else if (zsup.Value(1) == 'n') zerosup = Standard_False;
@@ -269,7 +269,7 @@ IGESSelect_Dumper::IGESSelect_Dumper ()    {  }
   if (type.IsEqual("IGESSelect_SplineToBSpline")) {
     if (file.NbParams() < 1) return Standard_False;
     Standard_Boolean tryc2;
-    const TCollection_AsciiString tc2 = file.ParamValue(1);
+    const TCollection_AsciiString& tc2 = file.ParamValue(1);
     if (tc2.Length() < 1) return Standard_False;
     if      (tc2.Value(1) == 'T') tryc2 = Standard_True;
     else if (tc2.Value(1) == 'N') tryc2 = Standard_False;
index 7dd8339741b609c670c85b654a06232b2fbf5138..e1f2a409db0354ab28497f9d36ca236f1a39ea7b 100644 (file)
@@ -157,7 +157,7 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
   Interface_CheckTool cht (model,protocol);
   Interface_CheckIterator anIter = cht.CompleteCheckList();
   for(anIter.Start(); anIter.More(); anIter.Next()) {
-    const Handle(Interface_Check) ach = anIter.Value();
+    const Handle(Interface_Check)& ach = anIter.Value();
     nbWarn += ach->NbWarnings();
     nbFail += ach->NbFails();
   }
index 653b3ad1c788abcb4a6ca7747c13cc91adc77e18..646471211133d6deb9a173284479fcdcd94e1b73 100644 (file)
@@ -1590,7 +1590,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const Handle(IGESGeom_Pl
            return res;
          }
          
-         TopoDS_Face F = MF.Face();
+         const TopoDS_Face& F = MF.Face();
          GProp_GProps G;
          BRepGProp::SurfaceProperties(F,G);
          if (G.Mass() < 0) {
index 6ecec5365188e4692a133a6874487c99d6af7ffe..ef7c959e0ad4e2830f96a9d7b7a1c0e48ed743aa 100644 (file)
@@ -1414,7 +1414,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
         gp_Pnt ptpoly;
         IntSurf_PntOn2S p2s;
         Handle(IntSurf_LineOn2S) Thelin = new IntSurf_LineOn2S ();
-        Handle(Adaptor2d_Curve2d) arcsegm = thesegm.Curve();
+        const Handle(Adaptor2d_Curve2d)& arcsegm = thesegm.Curve();
         Standard_Integer nbsample = 100;
 
         if (!reversed) {
index 286bac96fc1d34fe98ad3a6032be544f8e4838cf..6c4deb277708650979482561b0071bcb5238d7e1 100644 (file)
@@ -736,7 +736,7 @@ Standard_Boolean IntTools_Context::IsValidBlockForFace
 
   aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2);
 
-  Handle(Geom_Curve) aC3D=aC.Curve();
+  const Handle(Geom_Curve)& aC3D=aC.Curve();
   // point 3D
   aC3D->D0(aTInterm, aPInterm);
   //
@@ -821,7 +821,7 @@ Standard_Boolean IntTools_Context::IsVertexOnLine
   
   aPv=BRep_Tool::Pnt(aV);
 
-  Handle(Geom_Curve) aC3D=aC.Curve();
+  const Handle(Geom_Curve)& aC3D=aC.Curve();
   
   
   aTolSum=aTolV+aTolC;
index 3c72ec99066e75ca77f9ac15e6181ca814931c0c..6575cea309ae1009194772c0a3685ffeaf87b071 100644 (file)
@@ -201,12 +201,12 @@ static
   Standard_Integer IntTools_Tools::SplitCurve(const IntTools_Curve& IC,
            IntTools_SequenceOfCurves& aCvs)
 {
-  Handle (Geom_Curve) aC3D =IC.Curve();
+  const Handle (Geom_Curve)& aC3D =IC.Curve();
   if(aC3D.IsNull())
     return 0;
   //
-  Handle (Geom2d_Curve) aC2D1=IC.FirstCurve2d();
-  Handle (Geom2d_Curve) aC2D2=IC.SecondCurve2d();
+  const Handle (Geom2d_Curve)& aC2D1=IC.FirstCurve2d();
+  const Handle (Geom2d_Curve)& aC2D2=IC.SecondCurve2d();
   Standard_Boolean bIsClosed;
 
   bIsClosed=IntTools_Tools::IsClosed(aC3D);
index 7d6412474e998f6cbdf7d3b28f06be7ce5d68c4c..bc7a982418ba26309b030eeb453bcdb3f973b96e 100644 (file)
@@ -158,7 +158,7 @@ void Interface_Graph::Evaluate()
     //    Mise en forme : liste d entiers
     for (iter.Start(); iter.More(); iter.Next()) {
       //    num = 0 -> on sort du Model de depart, le noter "Error" et passer
-      Handle(Standard_Transient) entshare = iter.Value();
+      const Handle(Standard_Transient)& entshare = iter.Value();
       if(entshare == ent)
         continue;
 
@@ -349,7 +349,7 @@ void  Interface_Graph::GetFromIter
    if(thestats.IsNull())
     return;
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer num = EntityNumber(ent);
     if (!num) 
       continue;
@@ -368,7 +368,7 @@ void  Interface_Graph::GetFromIter
   if(thestats.IsNull())
     return;
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer num   = EntityNumber(ent);
     if (!num) 
       continue;
index c0a16a91b045077258c03a33dd480193956bde43..e7fa227ea0a7d5da7697f0213c819caf3ee85398 100644 (file)
@@ -34,7 +34,7 @@ Interface_GraphContent::Interface_GraphContent ()    {  }
   Standard_Integer nb = list.NbEntities();
   if (nb == 0) return;                             // Liste redefinie a VIDE
   for( ; list.More(); list.Next()) {
-    Handle(Standard_Transient) curent = list.Value();
+    const Handle(Standard_Transient)& curent = list.Value();
     if (agraph.IsPresent(agraph.EntityNumber(curent))) 
       GetOneItem (curent);
   }
index 184743ce32d025f45e74035e83d723e5068ecafd..7c1331345fbbb72929b301cbf8a163fe7112e5a9 100644 (file)
@@ -498,7 +498,7 @@ void Interface_InterfaceModel::FillSemanticChecks
   for (checks.Start(); checks.More(); checks.Next())  nb ++;
   therepch.ReSize (therepch.Extent() + nb + 2);
   for (checks.Start(); checks.More(); checks.Next()) {
-    const Handle(Interface_Check) ach = checks.Value();
+    const Handle(Interface_Check)& ach = checks.Value();
     Standard_Integer num = checks.Number();
 //    global check : ok si MEME MODELE
     if (num == 0) thechecksem->GetMessages(ach);
@@ -756,7 +756,8 @@ void Interface_InterfaceModel::GetFromTransfer
 {
   theentities.Clear();  theentities.ReSize (aniter.NbEntities());
   for (aniter.Start(); aniter.More(); aniter.Next()) {
-    Handle(Standard_Transient) ent = aniter.Value();    AddEntity(ent);
+    const Handle(Standard_Transient)& ent = aniter.Value();
+    AddEntity(ent);
   }
 }
 
index 55398cf2b178b3b5d3f1cd52136c4efcf01429b7..bbd022949087d61034f43cca4ffa9b96918a6835 100644 (file)
@@ -158,7 +158,7 @@ Standard_Integer  Interface_MSG::Read (Standard_IStream& S)
   for (; iter.More(); iter.Next()) {
     if (!iter.Key().StartsWith(rootkey)) continue;
     S<<"@"<<iter.Key()<<"\n";
-    const Handle(TCollection_HAsciiString) str = iter.Value();
+    const Handle(TCollection_HAsciiString)& str = iter.Value();
     if (str.IsNull()) continue;
     nb ++;
     S<<str->ToCString()<<"\n";
index 730420954d572dc2e1daeae1299d21555bd38866..1720dc19f75956eede88bcd419e9096b8fc932c9 100644 (file)
@@ -202,7 +202,7 @@ void  Interface_ShareTool::Print (const Interface_EntityIterator& iter, Standard
 {
   S << " Nb.Entities : " << iter.NbEntities() << " : ";
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     S << " n0/id:"; 
     Model()->Print (ent, S);
   }
index 5ad7158714f2b29b78363952c90f7df194c48b38..edce77fcf6ed883e479c2dcc3c843610fa323603 100644 (file)
@@ -1644,7 +1644,7 @@ static TopoDS_Edge  NewEdge(const TopoDS_Edge& edg,
     Standard_Boolean rev = Standard_False;
     TopoDS_Vertex Vf = V1;
     TopoDS_Vertex Vl = V2;
-    Handle(Geom_Curve) Cimg = i2s.Line(i);
+    const Handle(Geom_Curve)& Cimg = i2s.Line(i);
     Handle(Geom2d_Curve) Cimg2d;
     if (AppS1) {
       Cimg2d = i2s.LineOnS1(i);
index 00535b00786474310366791dc41e4ee560d1b1f7..69228961859e9ff6db4d50d7622cf0e5ef936296 100644 (file)
@@ -457,7 +457,7 @@ Standard_Boolean LocOpe_SplitShape::Add(const TopTools_ListOfShape& Lwires,
         else
           {
             //we have to choose the direction
-            TopoDS_Edge aStartEdge = wexp.Current();
+            const TopoDS_Edge& aStartEdge = wexp.Current();
             TopTools_ListOfShape Ldirs;
             Ldirs.Append(aStartEdge);
             Ldirs.Append(NextSectionWire);
index 5dbadd8c40c08c32bcb1bf114d7fe75e9b9fcb55..5f282ddf6587a38b57ebfc7b0c7116e9b527dd56 100644 (file)
@@ -471,7 +471,7 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW)
       }
     }
     if (itms.More()) {
-      TopoDS_Shape fac = itms.Key();
+      const TopoDS_Shape& fac = itms.Key();
       for (exp.Init(fac,TopAbs_EDGE); exp.More(); exp.Next()) {
        if (!Mapebord.Add(exp.Current())) {
          Mapebord.Remove(exp.Current());
index 4e3d54c176016e7d8976ccd89d793fe6a451da75..2e2a31055bc7de98efd400d3fb75ab6afff37aee 100644 (file)
@@ -1727,7 +1727,7 @@ MAT2d_Mat2d::~MAT2d_Mat2d()
   MAT_DataMapIteratorOfDataMapOfIntegerBisector itmap(bisectormap);
   for (; itmap.More(); itmap.Next())
   {
-    Handle(MAT_Bisector) aBisector = itmap.Value();
+    const Handle(MAT_Bisector)& aBisector = itmap.Value();
     aBisector->FirstEdge(NULL);
     aBisector->SecondEdge(NULL);
   }
index 4c165a88224524b6064fe2872d8c589415512446..02f2997487f3f9dd18e1e07bd892c55e6bb58209 100644 (file)
@@ -474,7 +474,7 @@ static Standard_Integer MemLeakTest(Draw_Interpretor&, Standard_Integer /*nbarg*
     w.Close();     
     TopoDS_Wire wireShape( w.Wire());
     BRepBuilderAPI_MakeFace faceBuilder(wireShape);          
-    TopoDS_Face f( faceBuilder.Face());
+    const TopoDS_Face& f = faceBuilder.Face();
     BRepMesh_IncrementalMesh im(f,1);
     BRepTools::Clean(f);      
   }
index dba34e57f8b5ed1ae318c2877882f716e3a60fbb..4da739d9aa76b50a1ab0e603d716f3552d886e83 100644 (file)
@@ -146,7 +146,7 @@ Standard_Boolean MeshVS_Mesh::AcceptDisplayMode (const Standard_Integer theMode)
 
   for (MeshVS_SequenceOfPrsBuilder::Iterator aBuilderIter (myBuilders); aBuilderIter.More(); aBuilderIter.Next())
   {
-    Handle(MeshVS_PrsBuilder) aBuilder = aBuilderIter.Value();
+    const Handle(MeshVS_PrsBuilder)& aBuilder = aBuilderIter.Value();
     if (!aBuilder.IsNull()
       && aBuilder->TestFlags (theMode))
     {
index 0bbd84062ffdcb5e6e4a69244cb4e7a0ea00d7e0..2888a55bd9fc472b08e4e45fcfe8a8942813a831 100644 (file)
@@ -112,7 +112,7 @@ void Message_PrinterToReport::send (const TCollection_AsciiString& theString,
 //function : sendMetricAlert
 //purpose  :
 //=======================================================================
-void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString theValue,
+void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString& theValue,
                                                const Message_Gravity theGravity) const
 {
   Message_AlertExtended::AddAlert (Report(), new Message_AttributeMeter (theValue), theGravity);
index e82cfe156584e3a447da25c3cd477a4db3916c8d..eb05a606380e81b0d21d077ff73d373fede73eae 100644 (file)
@@ -61,7 +61,7 @@ protected:
                                      const Message_Gravity theGravity) const Standard_OVERRIDE;
 
   //! Send an alert with metrics active in the current report
-  Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString theValue,
+  Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString& theValue,
                                         const Message_Gravity theGravity) const;
 
 private:
index b63bd7137fb38b5ebca4beb45a37f59fc762f865..9f606f7448bfda6d643d7682bcb6d11d9b8fec3f 100644 (file)
@@ -148,7 +148,7 @@ void Message_Report::ActivateInMessenger (const Standard_Boolean toActivate,
     Message_SequenceOfPrinters aPrintersToRemove;
     for (Message_SequenceOfPrinters::Iterator anIterator (aMessenger->Printers()); anIterator.More(); anIterator.Next())
     {
-      const Handle(Message_Printer) aPrinter = anIterator.Value();
+      const Handle(Message_Printer)& aPrinter = anIterator.Value();
       if (aPrinter->IsKind(STANDARD_TYPE (Message_PrinterToReport)) &&
           Handle(Message_PrinterToReport)::DownCast (aPrinter)->Report() == this)
         aPrintersToRemove.Append (aPrinter);
index e5deb74a74849f67a3a3a6d7b736b9a38c2c97d5..b7533c8f8b05fa82da235d6dd287962d4ede57b1 100644 (file)
@@ -169,10 +169,10 @@ MoniTool_AttrList::MoniTool_AttrList ()    {  }
 
   NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
   for (; iter.More(); iter.Next()) {
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
     if (!name.StartsWith(fromname))
       continue;
-    Handle(Standard_Transient) atr = iter.Value();
+    const Handle(Standard_Transient)& atr = iter.Value();
     Handle(Standard_Transient) newatr = atr;
 
 //    Copy ? according type
index 244f821d83f8138005cafa4271be5872ad55e2f9..f6e7b7534f1736ccd0e712b31095be944b7a61b7 100644 (file)
@@ -192,7 +192,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
         def.AssignCat(" , alpha: ");
         NCollection_DataMap<TCollection_AsciiString, Standard_Integer>::Iterator listadd(theeadds);
         for (; listadd.More(); listadd.Next()) {
-          TCollection_AsciiString aName = listadd.Key();
+          const TCollection_AsciiString& aName = listadd.Key();
           Standard_CString enva = aName.ToCString();
           if (enva[0] == '?') continue;
           Sprintf(mess,":%d ",listadd.Value());
index 023485e76a6f7a7ea134eef3cbbd144f8dddf57a..0431d51df9d3b7b8d53bf5bd692425ead263cba6 100644 (file)
@@ -312,7 +312,7 @@ void OpenGl_Text::StringSize (const Handle(OpenGl_Context)& theCtx,
   }
   theWidth = Max (theWidth, aWidth);
 
-  Handle(OpenGl_Context) aCtx = theCtx;
+  const Handle(OpenGl_Context)& aCtx = theCtx;
   aFont.Nullify();
   aCtx->ReleaseResource (aFontKey, Standard_True);
 }
index a0a7b44e22278c0557cdbf9faf62c619fc8cef5e..436185e37b2ccd3da0e7b34ae0a60e7bc65e6cce 100644 (file)
@@ -201,7 +201,7 @@ static TCollection_ExtendedString TryXmlDriverType
   // of the DocumentElement, the XML format cannot be defined
   if (aParser.parse (theFileName.ToCString()))
   {
-    LDOM_Element anElement = aParser.GetElement();
+    const LDOM_Element& anElement = aParser.GetElement();
     if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
       theFormat = anElement.getAttribute ("format");
   }
@@ -226,7 +226,7 @@ static TCollection_ExtendedString TryXmlDriverType (Standard_IStream& theIStream
     // of the DocumentElement, the XML format cannot be defined
     if (aParser.parse (theIStream, Standard_True))
     {
-      LDOM_Element anElement = aParser.GetElement();
+      const LDOM_Element& anElement = aParser.GetElement();
       if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
         theFormat = anElement.getAttribute ("format");
     }
index b103684ade0dac1dc7c140ef17467767aa201790..ece9e75d193fd25e53d88a0de390d2a33ea89ddb 100644 (file)
@@ -895,7 +895,7 @@ Standard_Boolean PrsDim::InitAngleBetweenPlanarFaces (const TopoDS_Face& theFirs
   }
 
   // Get intersect line.
-  Handle(Geom_Curve) anIntersectCurve = aPlaneIntersector.Line (1);
+  const Handle(Geom_Curve)& anIntersectCurve = aPlaneIntersector.Line (1);
 
   Handle(Geom_Line) anIntersectLine = Handle(Geom_Line)::DownCast (anIntersectCurve);
 
@@ -982,8 +982,6 @@ Standard_Boolean PrsDim::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& th
   }
 
   // Get intersect line.
-  Handle(Geom_Curve) anIntersectCurve = aSurfaceIntersector.Line (1);
-
   Handle(Geom_Line) aFirstLine, aSecondLine;
   Standard_Real aFirstU = 0.0;
   Standard_Real aFirstV = 0.0;
index 0161b5d4e972e4d71475aff63dd5be9f50c20276..46426c1e1169590f5fe07c253afd8590368881c0 100644 (file)
@@ -218,7 +218,6 @@ void PrsDim_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs
 
   // current face
   BRepBuilderAPI_MakeFace makeface (myPlane->Pln());
-  TopoDS_Face face (makeface.Face());  
   BRepAdaptor_Surface adp (makeface.Face());
   
   // 2d lines => projection of 3d on current plane
index 756ee39b45c77d742ee80ff2e8f703ccf77bc464..037e0f5a5e7b7a20c091331118db698aca6c872d 100644 (file)
@@ -217,7 +217,6 @@ void PrsDim_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentat
   aPresentation->SetInfiniteState(isInfinite1 || isInfinite2);
   // current face  
   BRepBuilderAPI_MakeFace makeface(myPlane->Pln());
-  TopoDS_Face face(makeface.Face());  
   BRepAdaptor_Surface adp(makeface.Face());
     
   Standard_Integer typArg(0);
index 3cb38867de921ec0dca51efbf21d21a51bb0918c..b723891b86eb805c4a092ef281cb6d1abba38d5d 100644 (file)
@@ -346,7 +346,7 @@ void PrsMgr_PresentableObject::SetTransformPersistence (const Handle(Graphic3d_T
 //=======================================================================
 void PrsMgr_PresentableObject::AddChild (const Handle(PrsMgr_PresentableObject)& theObject)
 {
-  Handle(PrsMgr_PresentableObject) aHandleGuard = theObject;
+  const Handle(PrsMgr_PresentableObject)& aHandleGuard = theObject;
   if (theObject->myParent != NULL)
   {
     theObject->myParent->RemoveChild (aHandleGuard);
index 01b5566821e5d327b12866bc8634cca8ea22c9de..de3d1d74f81b70ba86fb8eb7a67bc8b9b34a9f25 100644 (file)
@@ -243,7 +243,7 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c
     }
     // Construction du Geom_Plane
     GC_MakePlane MkPlane(A,B,C);
-    Handle(Geom_Plane) theGeomPlane=MkPlane.Value();
+    const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value();
     
     // on le display & bind
     theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane );
index 524ef59741d9194d55d9c4a932409a37c17fe650..ddb79f56b2e333c266768261f54f2f896128c5b0 100644 (file)
@@ -391,7 +391,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con
 //  performTriangulation
 //=======================================================================
 
-Standard_Integer performTriangulation (TopoDS_Shape aShape, Draw_Interpretor& di)
+Standard_Integer performTriangulation (const TopoDS_Shape& aShape, Draw_Interpretor& di)
 {
   int failed=0, total=0;
   TopExp_Explorer ExpFace;
@@ -681,7 +681,7 @@ static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, cons
   Handle(Geom_BezierSurface) BezSurf = new Geom_BezierSurface(poles);
   Handle(Geom_BSplineSurface) BSpSurf = GeomConvert::SurfaceToBSplineSurface(BezSurf);
   BRepBuilderAPI_MakeFace faceMaker(BSpSurf, Precision::Confusion());
-  TopoDS_Face face = faceMaker.Face();
+  const TopoDS_Face& face = faceMaker.Face();
 
   gp_Pnt pnt(0, size, 0);
   BRepPrimAPI_MakeHalfSpace *hSpace = new BRepPrimAPI_MakeHalfSpace(face,pnt);
@@ -893,7 +893,7 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons
 //  performBlend
 //=======================================================================
 
-int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di)
+int performBlend (const TopoDS_Shape& aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di)
 {
   Standard_Integer status = 0;
   TopoDS_Shape newShape;
index ac029f88e9519e5bb8fa343fada42202a9f503e4..cd4131b9843206383b47ece39a80c18063c790aa 100644 (file)
@@ -440,7 +440,7 @@ Standard_Integer  OCC157(Draw_Interpretor& di,
     Handle(Geom_Surface) aSurf = FS.Surface();
     BRepBuilderAPI_MakeFace aMakeFace(aSurf,aWire,Standard_True);
     if(aMakeFace.IsDone()) {
-      TopoDS_Face aFace = aMakeFace.Face();
+      const TopoDS_Face& aFace = aMakeFace.Face();
       DBRep::Set(a[1],aFace);
     }
   }
@@ -569,7 +569,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/,
 
   BRepBuilderAPI_MakeWire wire_(edg1_, edg2_, edg3_, edg4_);
   BRepBuilderAPI_MakeFace face_(wire_);
-  TopoDS_Face sh_ = face_.Face();
+  const TopoDS_Face& sh_ = face_.Face();
 
   int up = 1;
 
@@ -585,7 +585,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/,
   myAISContext->Display(AISPoint, Standard_True);
 
   BRepPrimAPI_MakeHalfSpace half_(sh_, g_pnt);
-  TopoDS_Solid sol1_ = half_.Solid();
+  const TopoDS_Solid& sol1_ = half_.Solid();
 
   DBRep::Set("Face", sol1_);
 
@@ -1551,8 +1551,8 @@ static Standard_Integer OCC909 (Draw_Interpretor& di, Standard_Integer argc, con
   TopExp_Explorer TE(awire, TopAbs_VERTEX);
   if ( TE.More()) {
     BRepTools_WireExplorer WE;
-    for ( WE.Init(awire,aface); WE.More(); WE.Next()) {
-      TopoDS_Edge E = WE.Current();
+    for ( WE.Init(awire,aface); WE.More(); WE.Next())
+    {
       count++;
     }
   }
@@ -3885,9 +3885,9 @@ int TestCopyPaste(const Handle(TDocStd_Document)& doc)
   return 0;
 }
 
-int TestOpenSave(TCollection_ExtendedString aFile1,
-                TCollection_ExtendedString aFile2,
-                TCollection_ExtendedString aFile3)
+int TestOpenSave(const TCollection_ExtendedString& aFile1,
+                 const TCollection_ExtendedString& aFile2,
+                 const TCollection_ExtendedString& aFile3)
 {
   // Std
   Handle(TDocStd_Document) doc_std, doc_std_open;
@@ -4498,7 +4498,7 @@ static Standard_Integer OCC20627 (Draw_Interpretor& di, Standard_Integer argc, c
       w.Close();
       TopoDS_Wire wireShape( w.Wire());
       BRepBuilderAPI_MakeFace faceBuilder(wireShape);
-      TopoDS_Face f( faceBuilder.Face());
+      const TopoDS_Face& f( faceBuilder.Face());
       BRepMesh_IncrementalMesh im(f,1);
       BRepTools::Clean(f);
     }
index 492e2e14368cc8859ea20a681124989e33f30759..14dc5f20023efd039f2ed8771b815417d7c03fe0 100644 (file)
@@ -320,7 +320,7 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc,
     }
     // Construction du Geom_Plane
     GC_MakePlane MkPlane(A,B,C);
-    Handle(Geom_Plane) theGeomPlane=MkPlane.Value();
+    const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value();
     
     // on le display & bind
     theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane );
index b46fc24e2a241da25f8d72e81c8c56b1c7acfdab..8960b3c3ec9b257b068609b95b6543c0bf9025a9 100644 (file)
@@ -725,7 +725,7 @@ static Standard_Integer OCC606 ( Draw_Interpretor& di, Standard_Integer n, const
       if (!result_surf1.IsNull())
       {
         BRepBuilderAPI_MakeFace b_face1(result_surf1, Precision::Confusion());
-        TopoDS_Face bsp_face1 = b_face1.Face();
+        const TopoDS_Face& bsp_face1 = b_face1.Face();
         DBRep::Set(a[1],bsp_face1);
       }
     }
@@ -1053,7 +1053,7 @@ static Standard_Integer OCCN1 (Draw_Interpretor& di, Standard_Integer argc, cons
   TopoDS_Wire twire = wire.Wire();
 
   BRepBuilderAPI_MakeFace face(twire);
-  TopoDS_Face tface = face.Face();
+  const TopoDS_Face& tface = face.Face();
   ////////Handle(AIS_Shape) face_ais = new AIS_Shape( tface );
   ////////aContext->Display(face_ais);
 
index 2e0e7fbf1cf0aea3c0fdc57432c70b90e984f05e..c6f3d91c0eed897a28eec3ffbeec685560048f09 100644 (file)
@@ -96,7 +96,7 @@ static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, con
   }
 
   GCE2d_MakeSegment MakeSegment(P1,P2);
-  Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value();
+  const Handle(Geom2d_TrimmedCurve)& TrimmedCurve = MakeSegment.Value();
   DrawTrSurf::Set(argv[1], TrimmedCurve);
   return 0;
 }
@@ -1014,7 +1014,7 @@ static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, cons
     QCOMPARE ( Abs( ea.RealValue() - 0.1 * i ) < 1e-10 , Standard_True );
 
     // TCollection_ExtendedString (const TCollection_ExtendedString& astring)
-    const TCollection_ExtendedString f(e);
+    const TCollection_ExtendedString& f(e);
     //assert( f.Length() == e.Length());
     //assert( f == e );
     QCOMPARE ( f.Length() , e.Length() );
index b055b1a57d09e97dd010b78431b3a4e6f880a53e..b5e84f0ed270981a830989479f8cfc99f87c302c 100644 (file)
@@ -1992,7 +1992,7 @@ static Standard_Integer OCC26270(Draw_Interpretor& theDI,
       if (!aRes.IsNull())
       {
         BRepBuilderAPI_MakeFace b_face1(aRes, Precision::Confusion());
-        TopoDS_Face bsp_face1 = b_face1.Face();
+        const TopoDS_Face& bsp_face1 = b_face1.Face();
         DBRep::Set(theArgVal[2], bsp_face1);
       }
     }
index 4475f851a3cfc2d09b722c1677df02fa6e8b5f67..39f3f541854866a21ab3539f090e20ef4615af9b 100644 (file)
@@ -348,7 +348,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
   Handle(Geom_OffsetSurface) offsurf; 
   offsurf = new Geom_OffsetSurface(BZ1, -100); 
   BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() ); 
-  TopoDS_Face F2= bzf2.Face(); 
+  const TopoDS_Face& F2= bzf2.Face(); 
   Handle(AIS_Shape) ais22 = new AIS_Shape(F2); 
   aContext->Display (ais22, Standard_False);
   DBRep::Set("F2",F2);
@@ -1223,7 +1223,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c
   shell.Closed (BRep_Tool::IsClosed (shell));
 
   BRepPrimAPI_MakeHalfSpace half(shell, gp_Pnt(0, 0, 20));
-  TopoDS_Solid sol = half.Solid();
+  const TopoDS_Solid& sol = half.Solid();
   gp_Ax2 anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(0, 0, -1));
   BRepPrimAPI_MakeCylinder cyl(anAx2, 50, 300);
   TopoDS_Shape sh = cyl.Shape();
index 37717fd8dcb6e200a714f4a652e1964969736a5b..fedd0bb242499faf1f92a502c7eb4c6135f86f31 100644 (file)
@@ -30,7 +30,7 @@ void QABugs_PresentableObject::Compute(const Handle(PrsMgr_PresentationManager)&
                                const Handle(Prs3d_Presentation)& thePrs,
                                const Standard_Integer theMode)
 {
-  Handle(Graphic3d_Structure) aStructure (thePrs);
+  const Handle(Graphic3d_Structure)& aStructure = thePrs;
   Handle(Graphic3d_Group)     aGroup     = aStructure->NewGroup();
   Handle(Prs3d_ShadingAspect) anAspect = myDrawer->ShadingAspect();
   Graphic3d_MaterialAspect aMat = anAspect->Aspect()->FrontMaterial();
index aed84fb66549d4059ebf4347768e03bfe67aff84..72f344b9b52db4a2efe59234b4b8ee174ef5cfe0 100644 (file)
@@ -125,7 +125,7 @@ static Standard_Integer QADNaming_TCopyShape (Draw_Interpretor& di,
 
     DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName);
     for(;itrn.More();itrn.Next()) {
-      TCollection_AsciiString name = itrn.Value();
+      const TCollection_AsciiString& name = itrn.Value();
       const TopoDS_Shape Result = TR.Copied(itrn.Key());
       DBRep::Set(name.ToCString(), Result);
       di.AppendElement(name.ToCString());
index f8a9436c7edacd4192859242534e23e68f1631ed..1331011aeb5ba336e82117c6d84275e23863dcf3 100644 (file)
@@ -26,7 +26,7 @@ namespace
   // function : SetReaderParameters
   // purpose  :
   //=======================================================================
-  static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode) theNode)
+  static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode)& theNode)
   {
     theReader.SetDoublePrecision(!theNode->InternalParameters.ReadSinglePrecision);
     theReader.SetSystemLengthUnit(theNode->GlobalParameters.LengthUnit / 1000);
index 416b9c86a928b73605d40e42412bfca9dea8bb6a..981ce979364716dd02589eeee85a83723faedd6a 100644 (file)
@@ -333,7 +333,7 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::Check
    const Interface_ShareTool& aShto,
    Handle(Interface_Check)& ach) const
 {
-  Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) aRationalBSC = ent;
+  const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& aRationalBSC = ent;
   Handle(StepGeom_BSplineCurveWithKnots) aBSCWK =
     aRationalBSC->BSplineCurveWithKnots();
   RWStepGeom_RWBSplineCurveWithKnots t1;
index 1e106df80a18b118e6792e9029f0e35033ed41fb..1a517949b7f33f80f217b4b4dadfc12f47172ea0 100644 (file)
@@ -432,7 +432,7 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::Check
    const Interface_ShareTool& aShto,
    Handle(Interface_Check)& ach) const
 {
-  Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) aRationalBSS = ent;
+  const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& aRationalBSS = ent;
   Handle(StepGeom_BSplineSurfaceWithKnots) aBSSWK =
     aRationalBSS->BSplineSurfaceWithKnots();
   RWStepGeom_RWBSplineSurfaceWithKnots t1;
index 86da09c35ae548176cb166c5df22fc1f2c6271b8..3117ca72b6e0c7ddd4134848937647b9861afd76 100644 (file)
@@ -1166,7 +1166,7 @@ Handle(StepDimTol_HArray1OfDatumReferenceModifier) STEPCAFControl_GDTProperty::
   GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
                        const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
                        const Standard_Real theValue,
-                       const StepBasic_Unit theUnit)
+                       const StepBasic_Unit& theUnit)
 {
   if ((theModifiers.Length() == 0) && (theModifWithVal == XCAFDimTolObjects_DatumModifWithValue_None))
     return NULL;
@@ -1307,7 +1307,7 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con
 //function : GetTessellation
 //purpose  : 
 //=======================================================================
-Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape theShape)
+Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape)
 {
   // Build coordinate list and curves
   NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = new StepVisual_VectorOfHSequenceOfInteger;
index 03631c61ca9c06acd3acbdf104a86d99b711e6e1..c685b39edc8af3637d5d1e0ba42708c0cb002da4 100644 (file)
@@ -99,9 +99,9 @@ public:
   Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
                                                                                                  const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
                                                                                                  const Standard_Real theValue,
-                                                                                                 const StepBasic_Unit theUnit);
+                                                                                                 const StepBasic_Unit& theUnit);
 
-  Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape theShape);
+  Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape& theShape);
 
 };
 
index c7078c397bf00a009d5981154388faa528e4f7b8..6eb2db9feb38994059ea713fc5f64425d94a226a 100644 (file)
@@ -99,7 +99,7 @@ void STEPCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the
 // function : setStatic
 // purpose  :
 //=======================================================================
-void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter)
+void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter)
 {
   Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity);
   Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode);
index fb468efafa599b3eb3540dc9aa9c51043962b145..d7774028b1083a7e7c5e8af695ad45c7b98467a4 100644 (file)
@@ -139,7 +139,7 @@ public:
    void initStatic(const Handle(DE_ConfigurationNode)& theNode);
 
    //! Initialize static variables
-   void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter);
+   void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter);
 
    //! Reset used interface static variables
    void resetStatic();
index 7395804d8f5234077820674be38badf9f22db78a..1460a6a8d0ef51bed1563e5b2120a7f37e5d4514 100644 (file)
@@ -781,7 +781,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S,
     // check whether it has associated external ref
   TColStd_SequenceOfHAsciiString SHAS;
   if (ShapePDMap.IsBound(S) && PDFileMap.IsBound(ShapePDMap.Find(S))) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(ShapePDMap.Find(S));
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(ShapePDMap.Find(S));
     if (!EF.IsNull()) {
       // (store information on extern refs in the document)
       SHAS.Append(EF->GetName());
@@ -1231,7 +1231,7 @@ static Standard_Boolean IsOverriden(const Interface_Graph& theGraph,
         return Standard_True;
       }
       // for root style returns true only if it is overridden by other root style
-      auto anItem = anOverRidingStyle->ItemAP242 ().Value ();
+      const Handle(Standard_Transient)& anItem = anOverRidingStyle->ItemAP242().Value();
       if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)))
       {
         return Standard_True;
@@ -1315,7 +1315,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD,
 {
   TDF_Label L;
   if (PDFileMap.IsBound(PD)) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
     if (!EF.IsNull()) {
       L = EF->GetLabel();
       if (!L.IsNull()) return L;
@@ -1348,7 +1348,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance(const Handle(StepRepr_NextAssembly
   TDF_Label L;
 
   // get shape resulting from CDSR (in fact, only location is interesting)
-  Handle(Transfer_TransientProcess) TP = Tool.TransientProcess();
+  const Handle(Transfer_TransientProcess)& TP = Tool.TransientProcess();
   Handle(Transfer_Binder) binder = TP->Find(NAUO);
   if (binder.IsNull() || !binder->HasResult()) {
 #ifdef OCCT_DEBUG
@@ -1468,7 +1468,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD,
 {
   TDF_Label L;
   if (PDFileMap.IsBound(PD)) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
     if (!EF.IsNull()) {
       L = EF->GetLabel();
       if (!L.IsNull()) return L;
@@ -2093,7 +2093,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen
 //function : readAnnotationPlane
 //purpose  : read annotation plane
 //=======================================================================
-Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane) theAnnotationPlane,
+Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& theAnnotationPlane,
   gp_Ax2& thePlane)
 {
   if (theAnnotationPlane.IsNull())
@@ -2239,7 +2239,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
 //purpose  : read connection points for given dimension
 //=======================================================================
 void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
-  const Handle(Standard_Transient) theGDT,
+  const Handle(Standard_Transient)& theGDT,
   const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject)
 {
   if (theGDT.IsNull() || theDimObject.IsNull())
@@ -2252,7 +2252,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
 
   Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL;
   for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) {
-    Handle(Standard_Transient) anEnt = anIt.Value();
+    const Handle(Standard_Transient)& anEnt = anIt.Value();
     Handle(StepShape_DimensionalCharacteristicRepresentation) aDCR =
       Handle(StepShape_DimensionalCharacteristicRepresentation)::DownCast(anEnt);
     if (!aDCR.IsNull())
@@ -2355,7 +2355,7 @@ static Standard_Boolean ReadDatums(const Handle(XCAFDoc_ShapeTool) &STool,
   const Interface_Graph &graph,
   const Handle(Transfer_TransientProcess) &TP,
   const TDF_Label TolerL,
-  const Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR)
+  const Handle(StepDimTol_GeometricToleranceWithDatumReference)& GTWDR)
 {
   if (GTWDR.IsNull()) return Standard_False;
   Handle(StepDimTol_HArray1OfDatumReference) HADR = GTWDR->DatumSystem();
@@ -2772,14 +2772,14 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr
 
   Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
   for (anIter.Start(); anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anAtr = anIter.Value();
+    const Handle(Standard_Transient)& anAtr = anIter.Value();
     if (anAtr->IsKind(STANDARD_TYPE(StepDimTol_DatumSystem)))
     {
       Standard_Integer aPositionCounter = 0;//position on frame 
       Handle(StepDimTol_DatumSystem) aDS = Handle(StepDimTol_DatumSystem)::DownCast(anAtr);
       Interface_EntityIterator anIterDS = aGraph.Sharings(aDS);
       for (anIterDS.Start(); anIterDS.More(); anIterDS.Next()) {
-        Handle(Standard_Transient) anAtrDS = anIterDS.Value();
+        const Handle(Standard_Transient)& anAtrDS = anIterDS.Value();
         if (anAtrDS->IsKind(STANDARD_TYPE(StepAP242_GeometricItemSpecificUsage)))
         {
           //get axis
@@ -2957,7 +2957,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra
   // Collect all Shape_Aspect entities
   Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
   for (anIter.Start(); anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anAtr = anIter.Value();
+    const Handle(Standard_Transient)& anAtr = anIter.Value();
     NCollection_Sequence<Handle(StepRepr_ShapeAspect)> aSAs;
     if (anAtr->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape)))
     {
@@ -2965,14 +2965,14 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra
       Interface_EntityIterator anIterSDR = aGraph.Sharings(anAtr);
       for (anIterSDR.Start(); anIterSDR.More(); anIterSDR.Next())
       {
-        Handle(Standard_Transient) anAtrSDR = anIterSDR.Value();
+        const Handle(Standard_Transient)& anAtrSDR = anIterSDR.Value();
         if (anAtrSDR->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation)))
         {
           isAllOver = Standard_True;
           Interface_EntityIterator anIterABSR = aGraph.Shareds(anAtrSDR);
           for (anIterABSR.Start(); anIterABSR.More(); anIterABSR.Next())
           {
-            Handle(Standard_Transient) anAtrABSR = anIterABSR.Value();
+            const Handle(Standard_Transient)& anAtrABSR = anIterABSR.Value();
             if (anAtrABSR->IsKind(STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation)))
             {
               aSeqRI1.Append(anAtrABSR);
@@ -4416,7 +4416,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
 
 void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
   const Handle(TDocStd_Document)& theDoc,
-  const Handle(StepRepr_Representation) theRepr,
+  const Handle(StepRepr_Representation)& theRepr,
   TDF_LabelSequence& theShapes)
 {
   Handle(XSControl_TransferReader) aTR = theWS->TransferReader();
@@ -4451,7 +4451,7 @@ void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
 //=======================================================================
 Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_GeometricRepresentationItem)& theClippingCameraModel,
   TDF_LabelSequence& theClippingPlanes,
-  const Handle(XCAFDoc_ClippingPlaneTool) theTool)
+  const Handle(XCAFDoc_ClippingPlaneTool)& theTool)
 {
   Handle(TCollection_HAsciiString) anExpression = new TCollection_HAsciiString();
   NCollection_Sequence<Handle(StepGeom_GeometricRepresentationItem)> aPlanes;
@@ -4790,7 +4790,7 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha
     // topological containers to expand
     for (Standard_Integer i = 1; i <= aReprItems.Length(); ++i)
     {
-      Handle(StepRepr_RepresentationItem) aTRepr = aReprItems.Value(i);
+      const Handle(StepRepr_RepresentationItem)& aTRepr = aReprItems.Value(i);
       if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep)))
         aMSBSeq.Append(aTRepr);
       else if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel)))
index b9c9a2bee7c0ea1e8c578526e077a7b496bfe286..7dd761e5f5eae6846a757af01d80302d01e0d3e9 100644 (file)
@@ -318,7 +318,7 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const Standard_CString theFil
   for (NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>::Iterator anExtFileIter(myFiles);
        anExtFileIter.More(); anExtFileIter.Next())
   {
-    Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value();
+    const Handle(STEPCAFControl_ExternFile)& anExtFile = anExtFileIter.Value();
     if (anExtFile->GetWriteStatus() != IFSelect_RetVoid)
     {
       continue;
@@ -1040,7 +1040,7 @@ static Standard_Boolean setDefaultInstanceColor(const Handle(StepVisual_StyledIt
            aFatherStyleIter.More(); aFatherStyleIter.Next())
       {
         StepVisual_PresentationStyleSelect aPSS;
-        StepVisual_PresentationStyleSelect anOlDPSS = aFatherStyleIter.Value();
+        const StepVisual_PresentationStyleSelect& anOlDPSS = aFatherStyleIter.Value();
         if (!anOlDPSS.PointStyle().IsNull())
           aPSS.SetValue(anOlDPSS.PointStyle());
         else if (!anOlDPSS.CurveStyle().IsNull())
@@ -1090,7 +1090,7 @@ static void MakeSTEPStyles(STEPConstruct_Styles& theStyles,
   if (theInherit) aStyle = *theInherit;
   if (theSettings.Contains(theShape))
   {
-    XCAFPrs_Style anOwnStyle = theSettings.FindFromKey(theShape);
+    const XCAFPrs_Style& anOwnStyle = theSettings.FindFromKey(theShape);
     if (!anOwnStyle.IsVisible())
       aStyle.SetVisibility(Standard_False);
     if (anOwnStyle.IsSetColorCurv())
@@ -2315,7 +2315,7 @@ static StepBasic_Unit GetUnit(const Handle(StepRepr_RepresentationContext)& theR
 //purpose  : auxiliary
 //======================================================================
 static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard_Real theValue,
-                                                                  const StepBasic_Unit theUnit,
+                                                                  const StepBasic_Unit& theUnit,
                                                                   const Handle(TCollection_HAsciiString)& theName,
                                                                   const Standard_CString theMeasureName,
                                                                   const Standard_Boolean theIsAngle,
@@ -2375,7 +2375,7 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard
 //=======================================================================
 Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
                                                                      const TDF_Label theLabel,
-                                                                     const TopoDS_Shape theShape,
+                                                                     const TopoDS_Shape& theShape,
                                                                      Handle(StepRepr_RepresentationContext)& theRC,
                                                                      Handle(StepAP242_GeometricItemSpecificUsage)& theGISU)
 {
@@ -2432,7 +2432,7 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handl
   for (Interface_EntityIterator aSharingIter = aGraph.Sharings(aPDS);
        aSharingIter.More() && aSDR.IsNull(); aSharingIter.Next())
   {
-    Handle(Standard_Transient) anEntity = aSharingIter.Value();
+    const Handle(Standard_Transient)& anEntity = aSharingIter.Value();
     aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity);
   }
   if (aSDR.IsNull())
@@ -2457,7 +2457,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession
                                               const Standard_Boolean theHasPlane,
                                               const gp_Ax2& theAnnotationPlane,
                                               const gp_Pnt& theTextPosition,
-                                              const Handle(Standard_Transient) theDimension)
+                                              const Handle(Standard_Transient)& theDimension)
 {
   if (thePresentation.IsNull())
     return;
@@ -2509,7 +2509,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession
   // Plane
   Handle(StepGeom_Plane) aPlane = new StepGeom_Plane();
   GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane);
-  Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value();
+  const Handle(StepGeom_Axis2Placement3d)& anAxis = anAxisMaker.Value();
   // Set text position to plane origin
   Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint();
   Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
@@ -2540,7 +2540,7 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC
                                                                 const TDF_LabelSequence& theShapeL,
                                                                 const TDF_Label& theDatumL,
                                                                 const Standard_Boolean theIsFirstDTarget,
-                                                                const Handle(StepDimTol_Datum) theWrittenDatum)
+                                                                const Handle(StepDimTol_Datum)& theWrittenDatum)
 {
   // Get working data
   const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
@@ -2799,14 +2799,14 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC
 //           qualifiers, modifiers, orientation and tolerance class)
 //======================================================================
 static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
-                           const Handle(XCAFDimTolObjects_DimensionObject) theObject,
-                           const Handle(StepRepr_RepresentationContext) theRC,
-                           const StepShape_DimensionalCharacteristic theDimension)
+                           const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
+                           const Handle(StepRepr_RepresentationContext)& theRC,
+                           const StepShape_DimensionalCharacteristic& theDimension)
 {
   // Get working data
   const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
   XCAFDimTolObjects_DimensionModifiersSequence aModifiers = theObject->GetModifiers();
-  Handle(Standard_Transient) aDim = theDimension.Value();
+  const Handle(Standard_Transient)& aDim = theDimension.Value();
   Standard_Boolean isAngle = aDim->IsKind(STANDARD_TYPE(StepShape_AngularLocation)) ||
     aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize));
 
@@ -2929,7 +2929,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
     gp_Dir aDir;
     theObject->GetDirection(aDir);
     GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0));
-    Handle(StepGeom_CartesianPoint) aLoc = MkPoint.Value();
+    const Handle(StepGeom_CartesianPoint)& aLoc = MkPoint.Value();
     Handle(StepGeom_Direction) anAxis = new StepGeom_Direction();
     Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
     aCoords->SetValue(1, aDir.X());
@@ -3022,7 +3022,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
 //======================================================================
 static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS,
                                  const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
-                                 const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr,
+                                 const Handle(StepRepr_ConstructiveGeometryRepresentation)& theRepr,
                                  Handle(StepRepr_ShapeAspect)& theFirstSA,
                                  Handle(StepRepr_ShapeAspect)& theSecondSA,
                                  NCollection_Vector<Handle(StepGeom_CartesianPoint)>& thePnts)
@@ -3078,8 +3078,8 @@ static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS,
 //======================================================================
 static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession)& theWS,
                                                                            const TDF_Label theGeomTolL,
-                                                                           const TDF_LabelSequence theDatumSeq,
-                                                                           const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap,
+                                                                           const TDF_LabelSequence& theDatumSeq,
+                                                                           const STEPConstruct_DataMapOfAsciiStringTransient& theDatumMap,
                                                                            const Handle(StepRepr_RepresentationContext)& theRC)
 {
   // Get working data
index 0a6438de7a5172d6b51e21075e7e059a259a5440..f35dafd28bb5237abe431139dc545431da742546 100644 (file)
@@ -237,7 +237,7 @@ protected:
 
   Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
                                                 const TDF_Label theLabel,
-                                                const TopoDS_Shape theShape,
+                                                const TopoDS_Shape& theShape,
                                                 Handle(StepRepr_RepresentationContext)& theRC,
                                                 Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
 
@@ -248,13 +248,13 @@ protected:
                          const Standard_Boolean theHasPlane,
                          const gp_Ax2& theAnnotationPlane,
                          const gp_Pnt& theTextPosition,
-                         const Handle(Standard_Transient) theDimension);
+                         const Handle(Standard_Transient)& theDimension);
 
   Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
                                            const TDF_LabelSequence& theShapeL,
                                            const TDF_Label& theDatumL,
                                            const Standard_Boolean isFirstDTarget,
-                                           const Handle(StepDimTol_Datum) theWrittenDatum);
+                                           const Handle(StepDimTol_Datum)& theWrittenDatum);
 
   void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
                           const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
index b6e180155ecd8fa032445a146eceffc58e42edde..3fe626dabca9ee186e3a2a50b31b07bbd8cece57 100644 (file)
@@ -195,7 +195,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
   Handle(Standard_Type) tSDR = STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation);
   Interface_EntityIterator anIter = theGraph.Sharings(rep1);
   for (; anIter.More() && pd1.IsNull(); anIter.Next()) {
-      Handle(Standard_Transient) enti = anIter.Value();
+      const Handle(Standard_Transient)& enti = anIter.Value();
     if (enti->DynamicType() == tSDR) {
       Handle(StepShape_ShapeDefinitionRepresentation) SDR =
         Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
@@ -206,7 +206,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
   
   anIter = theGraph.Sharings(rep2);
   for (; anIter.More() && pd2.IsNull(); anIter.Next()) {
-      Handle(Standard_Transient) enti = anIter.Value();
+      const Handle(Standard_Transient)& enti = anIter.Value();
     if (enti->DynamicType() == tSDR) {
       Handle(StepShape_ShapeDefinitionRepresentation) SDR =
         Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
index c8624171d49d350197198d5efd0b9651e84a3d6d..66f63ad566743c11cb27eae87957d94b9103534c 100644 (file)
@@ -229,7 +229,7 @@ Standard_Boolean STEPConstruct_ExternRefs::LoadExternRefs ()
       // for each DocumentFile, find associated with it data:
       Interface_EntityIterator subs = Graph().Sharings(DocFile);
       for (subs.Start(); subs.More(); subs.Next()) {
-        Handle(Standard_Transient) sub = subs.Value();
+        const Handle(Standard_Transient)& sub = subs.Value();
         
         // FORMAT - ???????
         //
@@ -659,7 +659,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString
 //      Handle(Standard_Transient) sub = subs.Value();
     Interface_EntityIterator subs = Graph().Sharings(PD);
     for (subs.Start(); subs.More(); subs.Next()) {
-      Handle(Standard_Transient) sub = subs.Value();
+      const Handle(Standard_Transient)& sub = subs.Value();
       if (!sub->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) continue;
       Handle(StepRepr_ProductDefinitionShape) ProdDefSh = 
         Handle(StepRepr_ProductDefinitionShape)::DownCast ( sub );
@@ -682,7 +682,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString
 //        Interface_EntityIterator subs2 = Graph().Sharings(ProdDef);
     Interface_EntityIterator subs2 = Graph().Sharings(PD);
     for (subs2.Start(); subs2.More(); subs2.Next()) {
-      Handle(Standard_Transient) sub2 = subs2.Value();
+      const Handle(Standard_Transient)& sub2 = subs2.Value();
 
       if (sub2->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) {
         Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = 
index 2abe2e3a73a4d7e5edad453f5add314657cc3b13..a3f81219fbbb8712b76328eff16c0162a2cd80d1 100644 (file)
@@ -589,7 +589,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
         TopoDS_Iterator it(Result1);
         for ( ; it.More(); it.Next() ) 
         {
-          TopoDS_Shape aSubShape = it.Value();
+          const TopoDS_Shape& aSubShape = it.Value();
           B.Add(Cund, aSubShape);
         }
       }
@@ -639,7 +639,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
           TopoDS_Iterator it(Result1);
           for ( ; it.More(); it.Next() ) 
           {
-            TopoDS_Shape aSubShape = it.Value();
+            const TopoDS_Shape& aSubShape = it.Value();
             B.Add(Cund, aSubShape);
           }
         }
@@ -657,7 +657,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
       Interface_EntityIterator subs1 = graph.Sharings(rep);
       Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship);
       for (subs1.Start(); subs1.More(); subs1.Next()) {
-        Handle(Standard_Transient) anitem = subs1.Value();
+        const Handle(Standard_Transient)& anitem = subs1.Value();
         if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
           continue;
         if (anitem->DynamicType() == tSRR)
@@ -991,7 +991,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
       // Put not suspected open Shells as they are (updated 23.11.2010)
       TopExp_Explorer allShellsExp(comp, TopAbs_SHELL);
       for ( ; allShellsExp.More(); allShellsExp.Next() ) {
-        TopoDS_Shape aCurrentShell = allShellsExp.Current();
+        const TopoDS_Shape& aCurrentShell = allShellsExp.Current();
         if ( !myNMTool.IsPureNMShell(aCurrentShell) && !shellClosingsMap.Contains(aCurrentShell) )
           brepBuilder.Add(compWithClosings, aCurrentShell);
       }
@@ -1005,7 +1005,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
     TopExp_Explorer exp(comp, TopAbs_SHELL);
     for (; exp.More(); exp.Next())
     {
-        TopoDS_Shape aSubShape = exp.Current();
+        const TopoDS_Shape& aSubShape = exp.Current();
         if (aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed()) {
             TopoDS_Solid nextSolid;
             brepBuilder.MakeSolid(nextSolid);
@@ -1348,7 +1348,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::OldWay
   for (subs.Start(); subs.More() && PS.More(); subs.Next())
   {
     Message_ProgressRange aRange = PS.Next();
-    Handle(Standard_Transient) anitem = subs.Value();
+    const Handle(Standard_Transient)& anitem = subs.Value();
     if ( anitem->DynamicType() != tCDSR && anitem->DynamicType() != tSRR ) continue;
 //      DeclareAndCast(StepShape_ContextDependentShapeRepresentation,anitem,subs.Value());
 //      if (anitem.IsNull()) continue;
@@ -2026,12 +2026,12 @@ void STEPControl_ActorRead::computeIDEASClosings(const TopoDS_Compound& comp,
   TopExp_Explorer shellExpA(comp, TopAbs_SHELL);
 
   for ( ; shellExpA.More(); shellExpA.Next() ) {
-    TopoDS_Shape shellA = shellExpA.Current();
+    const TopoDS_Shape& shellA = shellExpA.Current();
     TopExp_Explorer shellExpB(comp, TopAbs_SHELL);
     TopTools_ListOfShape closingShells;
 
     for ( ; shellExpB.More(); shellExpB.Next() ) {
-      TopoDS_Shape shellB = shellExpB.Current();
+      const TopoDS_Shape& shellB = shellExpB.Current();
       if ( shellA.IsSame(shellB) )
         continue;
       // Check whether ShellB is non-manifold and adjacent to ShellA.
index 3caee3694141075a008f9b10e623c45ad8b30df2..e7e576ba6406b9c1868a47208d3c7e9e4c30346a 100644 (file)
@@ -228,7 +228,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
 
   TopoDS_Iterator anIt(theShape);
   for ( ; anIt.More(); anIt.Next() ) {
-    TopoDS_Shape aDirectChild = anIt.Value();
+    const TopoDS_Shape& aDirectChild = anIt.Value();
     if (aDirectChild.ShapeType() != TopAbs_COMPOUND)
       aBrepBuilder.Add(aDirectShapes, aDirectChild);
   }  
@@ -791,7 +791,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
 
     // Transfer Solids to closed Shells. Prepare RepItemSeq & NonManifoldGroup
     for ( TopoDS_Iterator iter(aNMCompound); iter.More(); iter.Next() ) {
-      TopoDS_Shape aSubShape = iter.Value();
+      const TopoDS_Shape& aSubShape = iter.Value();
       if (aSubShape.ShapeType() == TopAbs_SOLID) {
         for ( TopoDS_Iterator aSubIter(aSubShape); aSubIter.More(); aSubIter.Next() ) {
           TopoDS_Shell aSubShell = TopoDS::Shell( aSubIter.Value() );
@@ -1191,7 +1191,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
               aGCSet->SetName(empty);
               // iterates on compound with vertices and traces each vertex
               for ( anExp.ReInit() ; anExp.More(); anExp.Next() ) {
-                TopoDS_Shape aVertex = anExp.Current();
+                const TopoDS_Shape& aVertex = anExp.Current();
                 if ( aVertex.ShapeType() != TopAbs_VERTEX )
                   continue;
                 curNb++;
@@ -1483,7 +1483,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
   #endif
 
   for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) {
-    TopoDS_Shape aSubShape = iter.Value();
+    const TopoDS_Shape& aSubShape = iter.Value();
     if (aSubShape.ShapeType() != TopAbs_VERTEX || !isSeparateVertices) {
 
       // Store non-manifold topology as shells (ssv; 10.11.2010)
@@ -1597,7 +1597,7 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
   gp_Trsf aLoc;
   Standard_Boolean isShapeLocated = Standard_False;
   if ( GroupMode() >0) {
-    TopLoc_Location shloc = shape.Location();
+    const TopLoc_Location& shloc = shape.Location();
     isShapeLocated = !shloc.IsIdentity();
     aLoc = shloc.Transformation();
     TopLoc_Location shident;
@@ -1643,7 +1643,7 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
 
   // make location for assembly placement
   GeomToStep_MakeAxis2Placement3d mkax (aLoc);
-  Handle(StepGeom_Axis2Placement3d) AxLoc = mkax.Value();
+  const Handle(StepGeom_Axis2Placement3d)& AxLoc = mkax.Value();
   AX1 = AxLoc;
 
   // create assembly structures (CDSR, NAUO etc.)
index 9fe036fb754299b7be374744c484a45e576d7204..1ad2668a8504f030c37f4ac16b5167cccb7d81e8 100644 (file)
@@ -137,7 +137,7 @@ void STEPSelections_Counter::Count(const Interface_Graph& graph,
     Standard_Integer nbElem = gs->NbElements();
     for (Standard_Integer i = 1; i <= nbElem ; i++) {
       StepShape_GeometricSetSelect aGSS = gs->ElementsValue(i);
-      Handle(Standard_Transient) ent = aGSS.Value();
+      const Handle(Standard_Transient)& ent = aGSS.Value();
       Handle(StepGeom_CompositeCurve) ccurve = Handle(StepGeom_CompositeCurve)::DownCast(ent);
       if(!ccurve.IsNull()) {
        myNbWires++;
index f60bc0e90eabea9405658183504c32fa415535df..0b7878dc1b23a15e6fc2efee0e8b4cf70bd75a95 100644 (file)
@@ -94,7 +94,7 @@ static Standard_Integer LocDump (Draw_Interpretor& di, Standard_Integer argc, co
     return 1;
   }
 
-  TopLoc_Location L = a.Location();
+  const TopLoc_Location& L = a.Location();
   di << "Location of shape " << argv[1] << ":\n";
   di << "Results in:\n";
   gp_Trsf T = L.Transformation();
index 8739f8c289f025a4120a9894fb9d05ca06be562f..89fb16e790fd02e2e3284e5581119cdb82a6d9a6 100644 (file)
@@ -88,7 +88,7 @@ namespace
     }
 
   private:
-    BVHBuilderAdaptorRegular& operator=(BVHBuilderAdaptorRegular) { return *this; }
+    BVHBuilderAdaptorRegular& operator=(const BVHBuilderAdaptorRegular&) { return *this; }
 
   private:
     ObjectsMap& myObjects;
@@ -223,7 +223,7 @@ namespace
     }
 
   private:
-    BVHBuilderAdaptorPersistent& operator=(BVHBuilderAdaptorPersistent) { return *this; }
+    BVHBuilderAdaptorPersistent& operator=(const BVHBuilderAdaptorPersistent&) { return *this; }
 
   private:
     ObjectsMap& myObjects;
index df3159d98fddd4084d6528c433529ac87a6b8856..d33ea30427092d66ea658f866dbf3234835cfa90 100644 (file)
@@ -98,7 +98,7 @@ const Handle(Graphic3d_Camera)& SelectMgr_SelectingVolumeManager::Camera() const
 // function : SetCamera
 // purpose  :
 //=======================================================================
-void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera) theCamera)
+void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera)& theCamera)
 {
   Standard_ASSERT_RAISE(!myActiveSelectingVolume.IsNull(),
     "SelectMgr_SelectingVolumeManager::SetCamera() should be called after initialization of selection volume ");
index 708e7a885f234826e383add7cb96a4260d0123db..aed25cd94abbaf1cc390101e5f0bf49e007f0d2e 100644 (file)
@@ -89,7 +89,7 @@ public:
   //! Updates camera projection and orientation matrices in all selecting volumes
   //! Note: this method should be called after selection volume building
   //! else exception will be thrown
-  Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera) theCamera);
+  Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera);
 
   //! Updates viewport in all selecting volumes
   //! Note: this method should be called after selection volume building
index 5f8607341021a8f98e2b690bc5409b4ae50003f8..4370d4cee03c553dbef39bc0f28b10c82481a2ba 100644 (file)
@@ -1044,7 +1044,6 @@ void SelectMgr_ViewerSelector::MoveSelectableObject (const Handle(SelectMgr_Sele
 //=======================================================================
 void SelectMgr_ViewerSelector::RemoveSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject)
 {
-  Handle(SelectMgr_SelectableObject) anObj = theObject;
   if (myMapOfObjectSensitives.UnBind (theObject))
   {
     RemovePicked (theObject);
index c176ed0d1cb535844afae8b2a3213d043ac9ac02..8ffc86183f5938f741777e5aae68eb43f56c9276 100644 (file)
@@ -39,7 +39,7 @@
 
 #define NbControl 23
 
-static void ContourProperties(TopoDS_Wire wire,
+static void ContourProperties(const TopoDS_Wire& wire,
                              Standard_Real& countourArea,
                              Standard_Real& countourLength)
 {
@@ -49,8 +49,9 @@ static void ContourProperties(TopoDS_Wire wire,
   gp_XYZ prev, cont;
   
   for (BRepTools_WireExplorer exp(wire); exp.More(); exp.Next()) {
-    TopoDS_Edge Edge = exp.Current();  nbe++;
-      
+    const TopoDS_Edge& Edge = exp.Current();
+    nbe++;
+
     Standard_Real First, Last;
     Handle(Geom_Curve) c3d;
     ShapeAnalysis_Edge sae;
index 344be5a6e134e3adc90c4c03c8ac2be6f75d183a..2c5916df515e3f3e2e46bc9a99d467a1092601fb 100644 (file)
@@ -56,7 +56,7 @@ void ShapeAnalysis_Shell::Clear()
   if (shape.ShapeType() == TopAbs_SHELL) myShells.Add (shape); //szv#4:S4163:12Mar99 i =
   else {
     for (TopExp_Explorer exs (shape,TopAbs_SHELL); exs.More(); exs.Next()) {
-      TopoDS_Shape sh = exs.Current();
+      const TopoDS_Shape& sh = exs.Current();
       myShells.Add (sh); //szv#4:S4163:12Mar99 i =
     }
   }
@@ -120,7 +120,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
 
   TopTools_IndexedMapOfShape dirs, revs, ints;
   for (TopExp_Explorer exs(shape,TopAbs_SHELL); exs.More(); exs.Next()) {
-    TopoDS_Shape sh = exs.Current();
+    const TopoDS_Shape& sh = exs.Current();
     //szv#4:S4163:12Mar99 optimized
     if (CheckEdges (sh,myBad,dirs,revs,ints))
       if (myShells.Add (sh)) res = Standard_True;
@@ -134,7 +134,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
   Standard_Integer nb = dirs.Extent();
   Standard_Integer i; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= nb; i ++) {
-    TopoDS_Shape sh = dirs.FindKey (i);
+    const TopoDS_Shape& sh = dirs.FindKey (i);
     if (!myBad.Contains(sh)) {
       if (!revs.Contains(sh)) {
         if(checkinternaledges) {
@@ -154,7 +154,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
 
   nb = revs.Extent();
   for (i = 1; i <= nb; i ++) {
-    TopoDS_Shape sh = revs.FindKey (i);
+    const TopoDS_Shape& sh = revs.FindKey (i);
     if (!myBad.Contains(sh)) {
       if (!dirs.Contains(sh)) {
         if(checkinternaledges) {
index 326c062a1e16d3d5bcf74f74059391a3e4520303..e655fd5b0f120ce462bfdd85ef3eba380e00ead2 100644 (file)
@@ -231,7 +231,7 @@ Standard_Real ShapeAnalysis_TransferParametersProj::Perform(const Standard_Real
 //function : CorrectParameter
 //purpose  : auxiliary
 //=======================================================================
-static Standard_Real CorrectParameter(const Handle(Geom2d_Curve) crv,
+static Standard_Real CorrectParameter(const Handle(Geom2d_Curve)& crv,
                                      const Standard_Real param)
 {
   if(crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
@@ -580,7 +580,7 @@ TopoDS_Vertex ShapeAnalysis_TransferParametersProj::CopyNMVertex (const TopoDS_V
   //update tolerance
   Standard_Boolean needUpdate = Standard_False;
   gp_Pnt aPV = (*((Handle(BRep_TVertex)*)&anewV.TShape()))->Pnt();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   BRep_ListIteratorOfListOfCurveRepresentation toitcr
        ((*((Handle(BRep_TEdge)*)&toedge.TShape()))->ChangeCurves());
       
index 34b2d5ff520cbbca92a8dad41a2f4cee67564603..b731950da0d8ccb1d10c121d07d0337495f98276 100644 (file)
@@ -288,8 +288,8 @@ void ShapeBuild_Edge::SetRange3d (const TopoDS_Edge& edge,
 
 void ShapeBuild_Edge::CopyPCurves (const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge) const
 {
-  TopLoc_Location fromLoc = fromedge.Location();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& fromLoc = fromedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
     ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
       Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
index 89b9d6922315654040ac4b5e6c38974ec7bdfa19..1745e7448882313104e93cd3d58c7bca8e45a793 100644 (file)
@@ -59,7 +59,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Compound C;
     B.MakeCompound (C);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       Standard_Integer stat = Status (sh,newsh,Standard_False);
       if (stat != 0) modif = 1;
       if (stat >= 0) B.Add (C,newsh);
@@ -75,7 +75,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Solid S;
     B.MakeSolid (S);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       newsh = Apply (sh,until,buildmode);
       if (newsh.IsNull()) {
        modif = -1;
@@ -83,7 +83,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
       else if (newsh.ShapeType() != TopAbs_SHELL) {
        Standard_Integer nbsub = 0;
        for (TopExp_Explorer exh(newsh,TopAbs_SHELL); exh.More(); exh.Next()) {
-         TopoDS_Shape onesh = exh.Current ();
+         const TopoDS_Shape& onesh = exh.Current ();
          B.Add (S,onesh);
          nbsub ++;
        }
@@ -110,7 +110,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Shell S;
     B.MakeShell (S);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       newsh = Apply (sh,until,buildmode);
       if (newsh.IsNull()) {
        modif = -1;
@@ -118,7 +118,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
       else if (newsh.ShapeType() != TopAbs_FACE) {
        Standard_Integer nbsub = 0;
        for (TopExp_Explorer exf(newsh,TopAbs_FACE); exf.More(); exf.Next()) {
-         TopoDS_Shape onesh = exf.Current ();
+         const TopoDS_Shape& onesh = exf.Current ();
          B.Add (S,onesh);
          nbsub ++;
        }
@@ -189,7 +189,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
   
   // apply recorded modifications to subshapes
   for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
-    TopoDS_Shape sh = it.Value();
+    const TopoDS_Shape& sh = it.Value();
     newsh = Apply ( sh, until );
     if ( newsh != sh ) {
       if ( ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
@@ -207,7 +207,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     }
     Standard_Integer nitems = 0;
     for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
-      TopoDS_Shape subsh = subit.Value();
+      const TopoDS_Shape& subsh = subit.Value();
       if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );
       else locStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
     }
index d37d601ac7339be6991d58b4ae1fe2f25b132a64..db1e6bedd56000632b9c6a2a8f9bb5e629c195a5 100644 (file)
@@ -1513,7 +1513,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
     }
     
     GeomAPI_PointsToBSpline appr(points3d, params->Array1(), 1, 10, GeomAbs_C1, theTolerance2d);
-    Handle(Geom_BSplineCurve) crv3d = appr.Curve();
+    const Handle(Geom_BSplineCurve)& crv3d = appr.Curve();
     Standard_Integer NbPoles = crv3d->NbPoles();
     TColgp_Array1OfPnt poles3d (1, NbPoles);
     TColgp_Array1OfPnt2d poles2d (1, NbPoles);
index 97a99eed4b341847ba7dc6535b16778103bd96ff..ab5b8d0749b8faedfff32a167d99664561baf2e4 100644 (file)
@@ -56,7 +56,7 @@ static void FillList (const Handle(TopTools_HSequenceOfShape)& list,
                      const TopoDS_Shape& comp, const Standard_Boolean expcomp)
 {
   for (TopoDS_Iterator it (comp); it.More(); it.Next()) {
-    TopoDS_Shape sub = it.Value();
+    const TopoDS_Shape& sub = it.Value();
     if (sub.ShapeType() != TopAbs_COMPOUND) list->Append (sub);
     else if (!expcomp) list->Append (sub);
     else FillList (list,sub,expcomp);
@@ -118,7 +118,7 @@ TopAbs_ShapeEnum ShapeExtend_Explorer::ShapeType (const TopoDS_Shape& shape,
   if (!compound || res != TopAbs_COMPOUND) return res;
   res = TopAbs_SHAPE;
   for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
-    TopoDS_Shape sh = iter.Value();
+    const TopoDS_Shape& sh = iter.Value();
     if (sh.IsNull()) continue;
     TopAbs_ShapeEnum typ = sh.ShapeType();
     if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
index 6f710fac393c4d1207259512dd3770c40c5b1e06..cd16f3251a59396b2b81aa57b2f2cddf664627c8 100644 (file)
@@ -356,7 +356,7 @@ static Standard_Real getNearPoint(const TColgp_SequenceOfPnt& aSeq1,
 //purpose  : auxiliary for FixVertexPosition
 //=======================================================================
 static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges,
-                                        const TopoDS_Vertex theVert,
+                                        const TopoDS_Vertex& theVert,
                                         TopTools_SequenceOfShape& theSuitEdges,
                                         TopTools_SequenceOfShape& theRejectEdges,
                                         const Standard_Real theTolerance,
@@ -505,7 +505,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape,
     Standard_Integer nV =1;
     TopoDS_Iterator aExp3(aExp1.Current());
     for( ; aExp3.More(); aExp3.Next(),nV++) {
-      TopoDS_Shape aVert =  aExp3.Value();
+      const TopoDS_Shape& aVert =  aExp3.Value();
       if(nV ==1)
         aVert1 = aVert;
       else if(aVert1.IsSame(aVert))
index af2f722c343fea2ac07523013ea2611fa24e52a2..2e5e8265605f0d3ac2f94921de72930c481527f2 100644 (file)
@@ -721,7 +721,7 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
 // After applying context to (seam) edge, distribute its indices on new edges,
 // according to their parameters on that edge
 static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd,
-                                   const TopoDS_Face myFace,
+                                   const TopoDS_Face& myFace,
                                    const Standard_Integer index,
                                    const Standard_Integer nsplit,
                                    TColStd_SequenceOfInteger& indexes,
@@ -785,7 +785,7 @@ static void DefinePatch (ShapeFix_WireSegment &wire, const Standard_Integer code
 //function : GetGridResolution
 //purpose  : auxiliary
 //=======================================================================
-static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal) SplitValues,
+static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal)& SplitValues,
                                        const Standard_Integer cutIndex)
 {
   Standard_Integer nb = SplitValues->Length();
@@ -1869,7 +1869,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
     ShapeFix_WireSegment wire = seqw(i);
     if(wire.IsVertex())
       continue;
-    Handle(ShapeExtend_WireData) sbwd = wire.WireData();
+    const Handle(ShapeExtend_WireData)& sbwd = wire.WireData();
 
     // find first vertex for split
     Standard_Integer j; // svv #1
@@ -1933,7 +1933,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
 // -1 - short in 3d but not in 2d (to be checked after algo and atteching to 
 //      another wire if alone)
 static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
-                                        const TopoDS_Face myFace,
+                                        const TopoDS_Face& myFace,
                                         const Handle(Geom_Surface)& myGrid,
                                         const TopLoc_Location &myLoc,
                                         const Standard_Real UResolution,
@@ -1948,7 +1948,7 @@ static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
 
   Standard_Integer code = 1;
   ShapeAnalysis_Edge sae;
-  Handle(ShapeExtend_WireData) sbwd = seg.WireData();
+  const Handle(ShapeExtend_WireData)& sbwd = seg.WireData();
   for ( Standard_Integer i=1; i <= sbwd->NbEdges(); i++ ) {
     TopoDS_Edge edge = sbwd->Edge ( i );
     if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return 0;
@@ -2065,7 +2065,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
 
     // find next segment to connect (or first if sbwd is NULL)
     for ( i = 1; i <= seqw.Length(); i++ ) {
-      ShapeFix_WireSegment seg = seqw.Value(i);
+      const ShapeFix_WireSegment& seg = seqw.Value(i);
       if(seg.IsVertex())
         continue;
       TopAbs_Orientation anOr = seg.Orientation();
@@ -2101,7 +2101,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
       // distance                  2
       // short                     auto
       // angle ->> PI              1
-      Handle(ShapeExtend_WireData) wire = seg.WireData();
+      const Handle(ShapeExtend_WireData)& wire = seg.WireData();
       for ( Standard_Integer j=0; j <2; j++ ) {
         if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue;
 
@@ -2341,7 +2341,7 @@ static gp_Pnt2d GetMiddlePoint (const ShapeFix_WireSegment& wire,
   Bnd_Box2d box;
   ShapeAnalysis_Edge sae;
   ShapeAnalysis_Curve sac;
-  Handle(ShapeExtend_WireData) wd = wire.WireData();
+  const Handle(ShapeExtend_WireData)& wd = wire.WireData();
   for(Standard_Integer i = 1; i <= wd->NbEdges(); i++) {
     TopoDS_Edge E = wd->Edge (i);
     Standard_Real cf,cl;
@@ -2374,7 +2374,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
   if ( loops.Length() == 1 ) {
     TopoDS_Face newFace;
     B.MakeFace ( newFace, surf, myLoc, ::Precision::Confusion() );
-    TopoDS_Shape aSH = loops.Value(1);
+    const TopoDS_Shape& aSH = loops.Value(1);
     if( aSH.ShapeType() != TopAbs_WIRE)
       return;
     TopoDS_Wire wire = TopoDS::Wire ( loops.Value(1) );
@@ -2804,7 +2804,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
           loops.Append(wires(i).GetVertex());
       }
       else {
-        Handle(ShapeExtend_WireData) aWD = aSeg.WireData();
+        const Handle(ShapeExtend_WireData)& aWD = aSeg.WireData();
         if(!aWD.IsNull())
           loops.Append ( aWD->Wire() );
       }
index 15016761ebb2685ca888049db54bd8e66767ede1..b1dc19303bb09e45a7c2c3383f9ad366602fdf4b 100644 (file)
@@ -691,7 +691,7 @@ Standard_Boolean ShapeFix_Face::Perform()
           TopoDS_Shape aCurW = aItW.Value();
           while(aMapReorderedWires.IsBound(aCurW))
           {
-            TopoDS_Shape aFixW = aMapReorderedWires.Find(aCurW);
+            const TopoDS_Shape& aFixW = aMapReorderedWires.Find(aCurW);
             Context()->Replace(aCurW, aFixW);
             aCurW = aFixW;
           }
@@ -715,7 +715,7 @@ Standard_Boolean ShapeFix_Face::Perform()
 
 // Shift all pcurves of edges in the given wire on the given face 
 // to vector <vec>
-static void Shift2dWire(const TopoDS_Wire w, const TopoDS_Face f,
+static void Shift2dWire(const TopoDS_Wire& w, const TopoDS_Face& f,
                        const gp_Vec2d vec, 
                         const Handle(ShapeAnalysis_Surface)& mySurf,
                         Standard_Boolean recompute3d = Standard_False)
@@ -1418,7 +1418,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
     
     if(nb < nbAll) {
       for( i =1; i <= nbAll;i++) {
-        TopoDS_Shape aS2 = allSubShapes.Value(i);
+        const TopoDS_Shape& aS2 = allSubShapes.Value(i);
         if(aS2.ShapeType() != TopAbs_WIRE || 
            (aS2.Orientation() != TopAbs_FORWARD && aS2.Orientation() != TopAbs_REVERSED))
           B.Add ( S,aS2);
index b98d4bb2c565fa0ce8893efa3787353424ab750e..daa53f2adc20a22099e2805ddc8ef523cec13ad6 100644 (file)
@@ -1974,7 +1974,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
       B.Add(newface,wire);
     }
     for(i=1 ; i<=SeqNMShapes.Length(); i++) { 
-      TopoDS_Shape aNMS = SeqNMShapes.Value(i);
+      const TopoDS_Shape& aNMS = SeqNMShapes.Value(i);
       B.Add(newface,aNMS);
     }
     newface.Orientation(ori);
index fe2ba6e7541c6bf0147c0f5df496748f23536a8a..6eb989fad8466f7ebc0b8763182d201b967c4cee 100644 (file)
@@ -339,7 +339,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
   TopTools_SequenceOfShape AddShapes; 
   for(Standard_Integer i1 = 1 ; i1<=Lface.Length();i1++ )  {
    
-    TopoDS_Shape aShape = Lface.Value(i1);
+    const TopoDS_Shape& aShape = Lface.Value(i1);
     
     Standard_Integer aNbMultEdges =0;
     
@@ -347,7 +347,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
     for(TopoDS_Iterator aItWires(aShape,Standard_False);  aItWires.More();  aItWires.Next()) {
       Standard_Integer aNbEdges =0;
       for(TopoDS_Iterator aItEdges(aItWires.Value(),Standard_False);  aItEdges.More();  aItEdges.Next(),aNbEdges++) {
-        TopoDS_Shape edge = aItEdges.Value();
+        const TopoDS_Shape& edge = aItEdges.Value();
         if(!aMapMultiConnectEdges.Contains(edge)) continue;
         aNbMultEdges++;
       }
@@ -367,7 +367,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
     TopTools_DataMapOfShapeShape aTmpFaceShell;
     if(GetShells(llPosibleShells,aMap,aTmpShells,aTmpFaceShell,aTmp)) {
       for(Standard_Integer kk =1; kk <= aTmpShells.Length(); kk++) {
-        TopoDS_Shape aSh = aTmpShells.Value(kk);
+        const TopoDS_Shape& aSh = aTmpShells.Value(kk);
         TopTools_MapOfShape mapEdges;
         if(GetFreeEdges(aSh,mapEdges)) {
           Standard_Integer nbedge =0;
@@ -386,7 +386,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
   for(Standard_Integer k1 =1; k1 <= AddShapes.Length(); k1++) {
     TopTools_DataMapOfShapeInteger MapOtherShells;
     TopTools_MapOfShape dire,reve;
-    TopoDS_Shape aSh = AddShapes.Value(k1);
+    const TopoDS_Shape& aSh = AddShapes.Value(k1);
     TopTools_MapOfShape mapEdges;
     if(!GetFreeEdges(aSh,mapEdges)) continue;
     TopTools_ListOfShape lfaces;
@@ -573,7 +573,7 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
       Standard_Boolean isReversed = Standard_False;
       Standard_Integer nbedge =0;
       TopTools_MapOfShape mapEdges2;
-      TopoDS_Shape aShell2 = OpenShells.Value(j);
+      const TopoDS_Shape& aShell2 = OpenShells.Value(j);
       if(!GetFreeEdges(aShell2,mapEdges2)) continue;
       for(TopTools_MapIteratorOfMapOfShape aIte2( mapEdges2);aIte2.More() && isAddShell;aIte2.Next()) {
         TopoDS_Edge edge2 = TopoDS::Edge(aIte2.Key());
@@ -675,13 +675,13 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
 {
   TopTools_IndexedDataMapOfShapeListOfShape aMap;
   for(Standard_Integer i =1 ; i <= SeqShells.Length(); i++) {
-    TopoDS_Shape aShell = SeqShells.Value(i);
+    const TopoDS_Shape& aShell = SeqShells.Value(i);
     TopTools_IndexedMapOfShape medeg;
     TopExp::MapShapes(aShell,TopAbs_EDGE,medeg);
     for(TopTools_MapIteratorOfMapOfShape mit(aMapMultiConnectEdges); mit.More(); mit.Next()) {
     //for(TopExp_Explorer aExp(aShell,TopAbs_EDGE); aExp.More(); aExp.Next(),nbe++) {
       //TopoDS_Shape ae = aExp.Current();
-      TopoDS_Shape ae =mit.Key();
+      const TopoDS_Shape& ae =mit.Key();
       //if( aMapMultiConnectEdges.Contains(aExp.Current())) {
       if(medeg.Contains(ae)) {
         if(aMap.Contains(ae))
@@ -714,7 +714,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
       else if(ismerged) {
         TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
         while(aMapShells.Contains(arshell)){
-          TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+          const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
           if(ss.IsSame(arshell)) break;
           arshell = ss;
         }
@@ -729,7 +729,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
       else {
         TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
          while(aMapShells.Contains(arshell)) {
-          TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+          const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
           if(ss.IsSame(arshell)) break;
           arshell = ss;
         }
@@ -749,7 +749,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
     }
     if(mapmerge.Extent() >1 || ismerged) {
       for(TopTools_MapIteratorOfMapOfShape alit1(mapmerge); alit1.More();alit1.Next()) {
-        TopoDS_Shape oldShell = alit1.Key();
+        const TopoDS_Shape& oldShell = alit1.Key();
          //while(aMapShells.Contains(oldShell)) {
          //  TopoDS_Shape ss = aMapShells.FindFromKey(oldShell);
          //  if(ss.IsSame(oldShell)) break;
@@ -764,7 +764,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
     if(aMapShells.Contains(SeqShells.Value(nn))) {
       TopoDS_Shape aNewShell = aMapShells.FindFromKey(SeqShells.Value(nn));
       while(aMapShells.Contains(aNewShell)) {
-        TopoDS_Shape ss = aMapShells.FindFromKey(aNewShell);
+        const TopoDS_Shape& ss = aMapShells.FindFromKey(aNewShell);
         if(ss.IsSame(aNewShell)) break;
         aNewShell = ss;
       }
index 7a553995b50e42eec42250f57c9561b91f074b51..353614480254f724ca56a3e630c7ee755f8fa666 100644 (file)
@@ -167,7 +167,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
       if(!st) continue;
       for ( Standard_Integer j = 1; j <= aSeqShells.Length(); j++ ) {
         if(i==j) continue;
-        TopoDS_Shape aShell2 = aSeqShells.Value(j);
+        const TopoDS_Shape& aShell2 = aSeqShells.Value(j);
         if(!BRep_Tool::IsClosed(aShell2)) continue;
         if(aMapHoles.Contains(aShell2)) continue;
         if(aMapShellHoles.IsBound(aShell2)) {
@@ -245,7 +245,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
 //purpose  : 
 //=======================================================================
 
-static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_IndexedMapOfShape& aMapSolids)
+static Standard_Boolean CreateSolids(const TopoDS_Shape& theShape,TopTools_IndexedMapOfShape& aMapSolids)
 {
   TopTools_SequenceOfShape aSeqShells;
   Standard_Boolean isDone = Standard_False;
@@ -432,8 +432,8 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres
     if(aExp.More()) {
       TopoDS_Shell  aShtmp = TopoDS::Shell(aExp.Current());
       ShapeAnalysis_FreeBounds sfb(aShtmp);
-      TopoDS_Compound aC1 = sfb.GetClosedWires();
-      TopoDS_Compound aC2 = sfb.GetOpenWires();
+      const TopoDS_Compound& aC1 = sfb.GetClosedWires();
+      const TopoDS_Compound& aC2 = sfb.GetOpenWires();
       Standard_Integer numedge =0;
       TopExp_Explorer aExp1(aC1,TopAbs_EDGE); 
       for( ; aExp1.More(); aExp1.Next())
@@ -474,7 +474,7 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres
     if(CreateSolids(aResShape,aMapSolids)) {
       SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected.. 
       if(aMapSolids.Extent() ==1) {
-        TopoDS_Shape aResSol = aMapSolids.FindKey(1);
+        const TopoDS_Shape& aResSol = aMapSolids.FindKey(1);
         if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) {
           TopoDS_Solid solid;
           BRep_Builder B;
index f03fd76f01f84291f0e44aaf6c13d5f703742006..fd99e29005d00dad0df67a26edceb6c6f4202e8a 100644 (file)
@@ -3306,8 +3306,8 @@ static void CopyReversePcurves(const TopoDS_Edge& toedge,
                               const TopoDS_Edge& fromedge,
                               const Standard_Boolean reverse)
 {
-  TopLoc_Location fromLoc = fromedge.Location();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& fromLoc = fromedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
        ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
     Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
index e24d82e595ac699f1105ad01544d7229dab6157a..7cf4ab76613f9011272c3a2ab77dcd118292d058 100644 (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 ) 
   {
index ff0c54fe2b3bb127515479b8654696ff981fc09a..070f06b70aa1bd6e04383f49bf9c71d5be28ac7c 100644 (file)
@@ -406,7 +406,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
 //purpose  : 
 //=======================================================================
 
-static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
+static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface)& surf,
                                       const Standard_Real U1,
                                       const Standard_Real U2,
                                       const Standard_Real V1,
index 1b000c1366801df5fe830d13f1b37b8b9778dd71..4b3e52bb3971281c0144eed2b95bfdd066b59f65 100644 (file)
@@ -113,7 +113,7 @@ ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires(const TopoDS_
   TopTools_IndexedDataMapOfShapeListOfShape aWireFaces;
   Standard_Integer i =1, nb = theSeqShapes.Length();
   for( ; i <= nb; i++) {
-    TopoDS_Shape aS = theSeqShapes.Value(i);
+    const TopoDS_Shape& aS = theSeqShapes.Value(i);
     if(aS.ShapeType() == TopAbs_FACE)
       removeSmallWire(aS,TopoDS_Wire());
     else if(aS.ShapeType() == TopAbs_WIRE) {
@@ -163,7 +163,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallWire (const TopoDS_Shape& theF
       
       TopoDS_Iterator aIte(aW,Standard_False);
       for( ; aIte.More(); aIte.Next()) {
-        TopoDS_Shape aE = aIte.Value();
+        const TopoDS_Shape& aE = aIte.Value();
         if(myRemoveEdges.IsBound(aE))
           myRemoveEdges.ChangeFind(aE).Append(aF);
         else {
@@ -193,7 +193,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallFaces ()
     //collecting all faces containing edges from removed wire
     for( ; aIte.More(); aIte.Next()) {
       
-      TopoDS_Shape aEdge =  aIte.Value();
+      const TopoDS_Shape& aEdge =  aIte.Value();
       if(!myEdgeFaces.Contains(aEdge)) {
         myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
         continue;
index caba9bfb613409aae2e46afd6e497ec03dbd77cf..d422ed9e4648a3d692e9220ce75c9b58f94a654d 100644 (file)
@@ -52,7 +52,7 @@ ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations()
 
  Standard_Boolean ShapeUpgrade_RemoveLocations::Remove(const TopoDS_Shape& theShape) 
 {
-  TopoDS_Shape aShape = theShape;
+  const TopoDS_Shape& aShape = theShape;
   myShape = aShape;
   TopAbs_ShapeEnum shtype = theShape.ShapeType();
   Standard_Boolean isRemoveLoc = ((shtype != TopAbs_COMPOUND && myLevelRemoving == TopAbs_SHAPE) || 
@@ -179,7 +179,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape&
      aNewShape= myMapNewShapes.Find(aShape);
      aNewShape.Orientation(theShape.Orientation());
      if(!theRemoveLoc && !theShape.Location().IsIdentity()) {
-       TopLoc_Location aL = theShape.Location();
+       const TopLoc_Location& aL = theShape.Location();
        aNewShape.Location(aL);
      }
      if(shtype != TopAbs_EDGE) {
@@ -256,7 +256,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape&
     aNewShape.Orientation(TopAbs_FORWARD);
     TopoDS_Iterator aIt(aShape,Standard_False,isRemoveLoc);
     for( ; aIt.More(); aIt.Next()) {
-      TopoDS_Shape subshape = aIt.Value();
+      const TopoDS_Shape& subshape = aIt.Value();
       TopoDS_Shape anewsubshape;
       Standard_Boolean isDoneSubShape = MakeNewShape(subshape,anAncShape,anewsubshape,isRemoveLoc);
       isDone = (isDone || isDoneSubShape);
index eb252bddc0a0aeb6fed5800d49641a7860b50c6d..494d5b2db12ad584b1c0b99b0cc3a6e2d49fd86e 100644 (file)
@@ -138,7 +138,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
     if ( spc.Status ( ShapeExtend_DONE3 ) ) {
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
-      Handle(Geom_Curve) aNewBascurve = spc.GetCurve();
+      const Handle(Geom_Curve)& aNewBascurve = spc.GetCurve();
       Surface->SetBasisCurve(aNewBascurve);
     }
     return;
index 7d603b2dae6b84d2c0769aaae4c79746ddf2b85f..022fdc7915bc1507a34efd8bc72aa6c7ea071dcd 100644 (file)
@@ -1154,7 +1154,7 @@ static void AddPCurves(const TopTools_SequenceOfShape& theFaces,
 // seams and equal edges are dropped
 // Returns true if one of original edges dropped
 static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
-                                         const TopoDS_Shape aShape,
+                                         const TopoDS_Shape& aShape,
                                          Standard_Integer& anIndex,
                                          TopTools_SequenceOfShape& theRemovedEdges)
 {
@@ -1162,7 +1162,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
   TopTools_IndexedMapOfShape aNewEdges;
   //add edges without seams
   for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
-    TopoDS_Shape edge = exp.Current();
+    const TopoDS_Shape& edge = exp.Current();
     if(aNewEdges.Contains(edge))
     {
       aNewEdges.RemoveKey(edge);
@@ -2496,7 +2496,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeEdges(TopTools_SequenceOfSha
     // fill in the map V-E
     for (TopoDS_Iterator it(anEdge.Oriented(TopAbs_FORWARD)); it.More(); it.Next())
     {
-      TopoDS_Shape aV = it.Value();
+      const TopoDS_Shape& aV = it.Value();
       if (aV.Orientation() == TopAbs_FORWARD || aV.Orientation() == TopAbs_REVERSED)
       {
         if (!aMapVE.Contains(aV))
@@ -3072,7 +3072,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
               Standard_Boolean hasConnectAnotherFaces = Standard_False;
               TopExp_Explorer ex(faces(i), TopAbs_EDGE);
               for (; ex.More() && !hasConnectAnotherFaces; ex.Next()) {
-                TopoDS_Shape aE = ex.Current();
+                const TopoDS_Shape& aE = ex.Current();
                 const TopTools_ListOfShape& aLF = aMapEF.FindFromKey(aE);
                 if (aLF.Extent() > 1) {
                   for (it.Init(aLF); it.More() && !hasConnectAnotherFaces; it.Next()) {
index 0bd2850378a814e8dcfcca988498e72c5047a2db..63600eaee9567bc4f89354231a358805ba319308 100644 (file)
@@ -167,8 +167,8 @@ void ShapeUpgrade_WireDivide::SetSurface(const Handle(Geom_Surface)& S,
 //purpose  : 
 //=======================================================================
 
-static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
-                              const Handle(TColStd_HSequenceOfReal) orig2d,
+static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal)& orig3d,
+                              const Handle(TColStd_HSequenceOfReal)& orig2d,
                               Handle(TColStd_HSequenceOfReal) new2d,
                               Handle(TColStd_HSequenceOfReal) new3d)
 {
index 57a75d7486658e19a6d78e0bc70ccb8a85639ab1..29d03a8d9728dbdb481565f626c63393edfb0335 100644 (file)
@@ -39,7 +39,7 @@ void StdLPersistent_Dependency::instance<AttribClass>::Import
     StdLPersistent_HArray1OfPersistent::Iterator anIter (*myVariables->Array());
     for (; anIter.More(); anIter.Next())
     {
-      const Handle(StdObjMgt_Persistent) aPersistent = anIter.Value();
+      const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value();
       if (aPersistent)
         theAttribute->GetVariables().Append (aPersistent->GetAttribute());
     }
index ecaa4128aa8e8af6585cf5f304164d2863918fc9..0daf4f0c73d9c98c47f7e161d75014f1aa6d3235 100644 (file)
@@ -85,7 +85,7 @@ void StdPersistent_Naming::Name::Import
     StdLPersistent_HArray1OfPersistent::Iterator anIter (*myArgs->Array());
     for (; anIter.More(); anIter.Next())
     {
-      Handle(StdObjMgt_Persistent) aPersistent = anIter.Value();
+      const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value();
       if (aPersistent)
       {
         Handle(TDF_Attribute) anArg = aPersistent->GetAttribute();
index cde1d4ec4d8a5b007a8dfc3994f39ca76666d5e2..7f68142ba4ba94a747b4674dce5f2849f06c57cf 100644 (file)
@@ -84,7 +84,7 @@ static void FindLimits(const Adaptor3d_Curve& aCurve,
 // purpose:
 //==================================================================
 static void DrawCurve (const Adaptor3d_Curve&        aCurve,
-                       const Handle(Graphic3d_Group) aGroup,
+                       const Handle(Graphic3d_Group)& aGroup,
                        const Standard_Integer        NbP,
                        const Standard_Real           U1,
                        const Standard_Real           U2,
index c189307ce5812d21adfebdbc2d8fa227cbbd2484..e00718b1d38b347213f5a8f21fec66191399c456 100644 (file)
@@ -597,7 +597,7 @@ Handle(StepFEA_HSequenceOfElementRepresentation) StepAP209_Construct::GetFeaElem
     aSequence = new StepFEA_HSequenceOfElementRepresentation;
   
   for (; anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anEntity = anIter.Value();
+    const Handle(Standard_Transient)& anEntity = anIter.Value();
     if(anEntity->IsKind(theType)) {
       Handle(StepFEA_ElementRepresentation) anElement =
         Handle(StepFEA_ElementRepresentation)::DownCast(anEntity);
index 5d86f078358f9edceb5afb54e4f97fbba57a7428..f8941148aff1fbf43e63be756302c5a3bf5bd647 100644 (file)
@@ -113,7 +113,7 @@ void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const
   Interface_ShareTool sh(me,aHP);
   Handle(Interface_GeneralModule) module;  Standard_Integer CN;
   for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) head = iter.Value();
+    const Handle(Standard_Transient)& head = iter.Value();
     if (!lib.Select(head,module,CN)) continue;
     module->CheckCase(CN,head,sh,ach);
   }
index ee04642aa8c02d2bf459557f623c80e99cac5ed0..b276ebf44daae5799dda78ea3f8743c62c714c9e 100644 (file)
@@ -172,7 +172,7 @@ void StepData_StepWriter::SendModel(const Handle(StepData_Protocol)& protocol,
   Interface_EntityIterator header = themodel->Header();
   thenum = 0;
   for (header.Start(); header.More(); header.Next()) {
-    Handle(Standard_Transient) anent = header.Value();
+    const Handle(Standard_Transient)& anent = header.Value();
 
 //   Write Entity via Lib  (similaire a SendEntity)
     Handle(StepData_ReadWriteModule) module;  Standard_Integer CN;
@@ -681,7 +681,7 @@ void  StepData_StepWriter::SendList(const StepData_FieldList& list,
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_PDescr) pde;
     if (!descr.IsNull()) pde  = descr->Field(i);
-    const StepData_Field fild = list.Field(i);
+    const StepData_Field& fild = list.Field(i);
     SendField (fild,pde);
   }
 // end entity  ?
index 7dca9ea9f74205c881b10e7817277bef2fd739f1..b5570da5f45fe0b6bd6828232c51f62dfb11720e 100644 (file)
@@ -24,7 +24,7 @@ StepKinematics_MechanismStateRepresentation::StepKinematics_MechanismStateRepres
 void StepKinematics_MechanismStateRepresentation::Init(const Handle(TCollection_HAsciiString)& theName,
                                                             const Handle(StepRepr_HArray1OfRepresentationItem)& theItems,
                                                             const Handle(StepRepr_RepresentationContext)& theContextOfItems,
-                                                            const Handle(StepKinematics_MechanismRepresentation) theMechanism)
+                                                            const Handle(StepKinematics_MechanismRepresentation)& theMechanism)
 {
        StepRepr_Representation::Init(theName, theItems, theContextOfItems);
        myRepresentedMechanism = theMechanism;
index 82ee1ca25cde65c3a55f0e0f123684ea5b03629e..7e26f9c1890ed307aee6ea44faa36ec1e951711c 100644 (file)
@@ -34,7 +34,7 @@ public:
   //! Returns a MechanismStateRepresentation
   Standard_EXPORT StepKinematics_MechanismStateRepresentation();
 
-  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation) theMechanism);
+  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
 
   Standard_EXPORT void SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
 
index b03f5f357513a9fb3188d2b254f01da180cfa5ea..66ae92690a4fb606f3b94669d7ff2252dae3b360 100644 (file)
@@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnitAndQRI,StepRepr_Re
 
 void StepRepr_ReprItemAndMeasureWithUnitAndQRI::Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, 
                                                       const Handle(StepRepr_RepresentationItem)& aRI, 
-                                                      const Handle(StepShape_QualifiedRepresentationItem) aQRI)
+                                                      const Handle(StepShape_QualifiedRepresentationItem)& aQRI)
 {
   StepRepr_ReprItemAndMeasureWithUnit::Init(aMWU, aRI);
   myQualifiedRepresentationItem = aQRI;
index 961a8165dd7f3d2c803b5172df4fa6ece0754b86..c8108ac603d02257a26685d8d0ac26fa06b3d397 100644 (file)
@@ -35,7 +35,7 @@ public:
   
   Standard_EXPORT StepRepr_ReprItemAndMeasureWithUnitAndQRI();
 
-  Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem) aQRI);
+  Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
   
   Standard_EXPORT void SetQualifiedRepresentationItem (const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
   
index b502766c3b0b57c47c44f0ba14b56e7c48590b81..1f431520a9d7fb010bd20685f37583d67788542c 100644 (file)
@@ -673,7 +673,7 @@ void StepToTopoDS_Builder::Init
   {
     Message_ProgressRange aRange = aPS.Next();
     StepShape_GeometricSetSelect aGSS = GCS->ElementsValue(i);
-    Handle(Standard_Transient) ent = aGSS.Value();
+    const Handle(Standard_Transient)& ent = aGSS.Value();
 
     TopoDS_Shape res = TransferBRep::ShapeResult ( TP, ent );
     if ( ! res.IsNull() ) { // already translated
index 8db51983252050778e51d4c8f41dbe7344dc2d02..143d995ea181acec85c8bcbf7b3f671fccbb9bc4 100644 (file)
@@ -184,7 +184,7 @@ Standard_Boolean StepToTopoDS_NMTool::IsPureNMShell(const TopoDS_Shape& Shell) {
   Standard_Boolean result = Standard_True;
   TopExp_Explorer edgeExp(Shell, TopAbs_EDGE);
   for ( ; edgeExp.More(); edgeExp.Next() ) {
-    TopoDS_Shape currentEdge = edgeExp.Current();
+    const TopoDS_Shape& currentEdge = edgeExp.Current();
     if ( !this->isEdgeRegisteredAsNM(currentEdge) ) {
       result = Standard_False;
       break;
@@ -223,10 +223,10 @@ Standard_Boolean StepToTopoDS_NMTool::isAdjacentShell(const TopoDS_Shape& ShellA
 
   TopExp_Explorer edgeExpA(ShellA, TopAbs_EDGE);
   for ( ; edgeExpA.More(); edgeExpA.Next() ) {
-    TopoDS_Shape currentEdgeA = edgeExpA.Current();
+    const TopoDS_Shape& currentEdgeA = edgeExpA.Current();
     TopExp_Explorer edgeExpB(ShellB, TopAbs_EDGE);
     for ( ; edgeExpB.More(); edgeExpB.Next() ) {
-      TopoDS_Shape currentEdgeB = edgeExpB.Current();
+      const TopoDS_Shape& currentEdgeB = edgeExpB.Current();
       if ( currentEdgeA.IsSame(currentEdgeB) )
         return Standard_True;
     }  
index 3b0e2fca74491e339d2e80fbc6826f990afe1462..a005fc8aca7305584a2e3688412384d3bc4e290e 100644 (file)
@@ -136,7 +136,7 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge&   ME,
 // ============================================================================
 
 static Handle(Geom_Curve) MakeCurve
-  (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess) TP)
+  (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP)
 {
   Handle(Geom_Curve) C2 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C1));
   if (!C2.IsNull()) return C2;
index e2c701774cad4a11b6d2b5c1083962854c0ae645..e4d07e86e80512b061998b00a82f37b514626cec 100644 (file)
@@ -80,7 +80,7 @@ void TDF_CopyLabel::ExternalReferences(const TDF_Label& aRefLabel, const TDF_Lab
 //     TDF_Tool::Entry(itr.Value()->Label(), entr1);  //d
 //     std::cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<" Label = "<<entr1 <<std::endl;
     for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
 
 //       TDF_Tool::Entry(att->Label(), entr1);  
 //       std::cout<<"\t\tReferences attribute dynamic type = "<<att->DynamicType()<<" Label = "<<entr1 <<std::endl;
@@ -169,7 +169,7 @@ void TDF_CopyLabel::Perform()
   TDF_ClosureTool::Closure(ds, myFilter, mode);
   if(extReferers) {
     for (TDF_MapIteratorOfAttributeMap attMItr(myMapOfExt);attMItr.More(); attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       myRT->SetRelocation(att, att);
 #ifdef OCCT_DEBUG
       PrintEntry(att->Label(), Standard_True);
index 50e85d0fc2a3be8a1274b6308ecc2970f68bdab0..afbd2dae757d9033cf57aae70de614afea1e724d 100644 (file)
@@ -243,7 +243,7 @@ Standard_Integer TDF_Data::CommitTransaction
           if (aPtrCurrentAtt->mySavedTransaction >=
               aPtrCurrentAtt->myTransaction)
           {
-            const Handle(TDF_Attribute) currentAtt = aPtrCurrentAtt;
+            const Handle(TDF_Attribute)& currentAtt = aPtrCurrentAtt;
             // Collision with a not forgotten version.
             if (backupAtt.IsNull()) {
               TDF_Data_DeltaCreation
index ca2228f9be07da17e66d8375c0172c82c164696e..954b540d957b4e1d9a95d4144ae438cc1e9205f8 100644 (file)
@@ -172,7 +172,7 @@ static Standard_Boolean TDF_Tool_DescendantRef
           attMItr.More(); attMItr.Next()) {
        // CLE
        // const Handle(TDF_Attribute)& att = attMItr.Key();
-       Handle(TDF_Attribute) att = attMItr.Key();
+       const Handle(TDF_Attribute)& att = attMItr.Key();
         if (!att.IsNull() && !att->Label().IsNull())
         {
          // ENDCLE
@@ -242,7 +242,7 @@ static void TDF_Tool_OutReferers(const TDF_Label& aRefLabel,
         attMItr.More(); attMItr.Next()) {
       // CLE
       // const Handle(TDF_Attribute)& att = attMItr.Key();
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       // ENDCLE
       if (aFilterForReferences.IsKept(att) &&
           !att->Label().IsNull() &&
@@ -316,7 +316,7 @@ static void TDF_Tool_OutReferences(const TDF_Label& aRefLabel,
     itr.Value()->References(ds);
     const TDF_AttributeMap& attMap = ds->Attributes();
     for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More();attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       if (aFilterForReferences.IsKept(att) &&
           !att->Label().IsNull() &&
           !att->Label().IsDescendant(aRefLabel))
index 7157746eb80a2118af39b5c3d5cef45433c4ce69..751ea1f8264fd8162229b88f72f9611202cf2b99 100644 (file)
@@ -119,7 +119,7 @@ void TDocStd_Application::ReadingFormats(TColStd_SequenceOfAsciiString &theForma
   NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)>::Iterator
     anIter(myReaders);
   for (; anIter.More(); anIter.Next()) {
-    Handle(PCDM_RetrievalDriver) aDriver = anIter.Value();
+    const Handle(PCDM_RetrievalDriver)& aDriver = anIter.Value();
     if (aDriver.IsNull() == Standard_False) {
       theFormats.Append(anIter.Key());
     }
@@ -138,7 +138,7 @@ void TDocStd_Application::WritingFormats(TColStd_SequenceOfAsciiString &theForma
   NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)>::Iterator
     anIter(myWriters);
   for (; anIter.More(); anIter.Next()) {
-    Handle(PCDM_StorageDriver) aDriver = anIter.Value();
+    const Handle(PCDM_StorageDriver)& aDriver = anIter.Value();
     if (aDriver.IsNull() == Standard_False) {
       theFormats.Append(anIter.Key());
     }
index 7238eda6a28089f703300a21b629bed13c00c4d3..1f30b327f344eb8b4e86e9427ee30f801ef33287 100644 (file)
@@ -376,7 +376,7 @@ static TopoDS_Shape MakeShape (const TopTools_IndexedMapOfShape& MS)
 //purpose  : Tries to make shape with given type from the given shape
 //=======================================================================
 
-static TopoDS_Shape ShapeWithType(const TopoDS_Shape     theShape,
+static TopoDS_Shape ShapeWithType(const TopoDS_Shape&     theShape,
                                  const TopAbs_ShapeEnum theType ) {
   if (theShape.IsNull() || theType == TopAbs_SHAPE) return theShape;
   Standard_Integer aType = theShape.ShapeType();
@@ -1351,7 +1351,7 @@ static Standard_Boolean  FilterByNeighbourgs (const TDF_Label&                L,
   //----------------------------------------
   // First argument: collection has to be filtered.
   //----------------------------------------
-  Handle(TNaming_NamedShape) Cand  = Args.First(); //collection of candidates
+  const Handle(TNaming_NamedShape)& Cand  = Args.First(); //collection of candidates
    
 #ifdef OCCT_DEBUG_FNB
   Standard_Integer i = 1;
index 4783d45a46f2fc2a94a06b06518adc96800753a3..d4ad4136b640ec41eb68decd6bd1d55317d70bb6 100644 (file)
@@ -96,7 +96,7 @@ Handle(TObj_Model) TObj_Assistant::FindModel
 //purpose  : 
 //=======================================================================
 
-void TObj_Assistant::BindModel (const Handle(TObj_Model) theModel)
+void TObj_Assistant::BindModel (const Handle(TObj_Model)& theModel)
 {
   getModels().Append(theModel);
 }
index f9ac21778fc72e3572420a860c1f91d8d0726829..702cc1c4ddc19c9403ff49690dc9ea548f6c17d2 100644 (file)
@@ -45,7 +45,7 @@ public:
 
   //! Binds model to the map
   static Standard_EXPORT void
-    BindModel     (const Handle(TObj_Model) theModel);
+    BindModel     (const Handle(TObj_Model)& theModel);
 
   //! Clears all records from the model map
   static Standard_EXPORT void
index 9952806b43b51e2d17fb681c3fae98ea0a1940c7..e4b9c58c247640a1cb73dd31963b038b977213cf 100644 (file)
@@ -739,8 +739,8 @@ void TopOpeBRep_DSFiller::InsertIntersection2d
   
   if ( ! ClearShapeSameDomain(aS1, aS2, HDS) ) return;
   
-  TopoDS_Shape S1 = aS1; 
-  TopoDS_Shape S2 = aS2; 
+  const TopoDS_Shape& S1 = aS1; 
+  const TopoDS_Shape& S2 = aS2; 
   TopOpeBRepDS_DataStructure& BDS1 = HDS->ChangeDS();
   BDS1.AddShape(S1,1);
   BDS1.AddShape(S2,2);
index 6b665f4720aaae6ae9c9bedfa7aadab2770e01da..f975368faeb6926a054620aae2c62986189f6c81 100644 (file)
@@ -249,7 +249,7 @@ void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E
       SetShapeTransition(P2D,T1,T2);
       
       if (isvertex1) {
-       const TopoDS_Shape V = V1;
+       const TopoDS_Shape& V = V1;
        Standard_Integer Vindex = myPDS->AddShape(V,1);
        TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
        EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_True,SSC,par1,1);
@@ -257,7 +257,7 @@ void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E
       }
       
       if (isvertex2) {
-       const TopoDS_Shape V = V2;
+       const TopoDS_Shape& V = V2;
        Standard_Integer Vindex = myPDS->AddShape(V,2);
        TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
        EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_False,SSC,par1,1);
index 0f30fdde7d1c44d6b6cdf8a58a95760246e4b6d7..bdea09c0e4360dbfb829038f8deb6a33d59a08ae 100644 (file)
@@ -123,9 +123,9 @@ TopOpeBRepDS_Transition TopOpeBRep_FFTransitionTool::ProcessLineTransition
   // P.IsOnDomS1() and P.IsOnDomS2() are both false
 
   Standard_Integer nbv = LI.NbVPoint();
-  TopOpeBRep_VPointInter P1 = LI.VPoint(1);
+  const TopOpeBRep_VPointInter& P1 = LI.VPoint(1);
   Standard_Real par1 = P1.ParameterOnLine();
-  TopOpeBRep_VPointInter Pn = LI.VPoint(nbv);
+  const TopOpeBRep_VPointInter& Pn = LI.VPoint(nbv);
   Standard_Real parn = Pn.ParameterOnLine();
 
   Standard_Real par = P.ParameterOnLine();
index d29dc21e2dfcb9e457c735446c940c8148ccfffe..5d82c1632b5d572ea20c693c209ea779bd47f2f4 100644 (file)
@@ -116,7 +116,7 @@ Standard_EXPORT void FUN_VPIndex(TopOpeBRep_FacesFiller& FF,
                                 Standard_Boolean& EPIfound, Handle(TopOpeBRepDS_Interference)& IEPI, // out 
                                 Standard_Boolean& CPIfound, Handle(TopOpeBRepDS_Interference)& ICPI, // out
                                 const Standard_Integer mkVP);
-Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure) HDS,
+Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
                                     const TopOpeBRep_FacesFiller& FF,
                                     const TopOpeBRep_LineInter& L,
                                     const Standard_Boolean& Lonrest,
index 7f6768cdaa1f39d339ae8fee6b211b073ff3687e..d9791d08e0a2919a6d4dcbaaf741f1abbc6f2ca0 100644 (file)
@@ -55,8 +55,8 @@ extern Standard_Boolean TopOpeBRep_GettraceCONIC();
 
 //-----------------------------------------------------------------------
 static void FUN_ALINETOWLINE (const Handle(IntPatch_ALine)& AL,
-                              const Handle(BRepAdaptor_Surface) surf1,
-                              const Handle(BRepAdaptor_Surface) surf2,
+                              const Handle(BRepAdaptor_Surface)& surf1,
+                              const Handle(BRepAdaptor_Surface)& surf2,
                               IntPatch_SequenceOfLine& theLines)
 {
   Standard_Integer nbpointsmax = 200;
index 845b2deaa020c468754d7f6cd728e8e4ceb6976f..7268d4ccd64fedfaaf3348b78f542ccf47d08340 100644 (file)
@@ -1265,7 +1265,7 @@ static TopoDS_Solid GetNewSolid(const TopoDS_Shape& S, TopoDS_Face& F)
   TopoDS_Wire w = mkw.Wire();
 
   BRepLib_MakeFace mkf( w );
-  TopoDS_Face infFace = mkf.Face();
+  const TopoDS_Face& infFace = mkf.Face();
   
   TopoDS_Shell newShell;
   TopoDS_Solid newSolid;
index e1971bc8ea05625632125ffca842fa0ea902f4c0..f5f27eb87c5303f0358aa404fd6b17fd42177990 100644 (file)
@@ -161,7 +161,7 @@ Standard_Boolean FUNBREP_topowalki_new
   Standard_Boolean keep = Standard_True;
   if  (LITdefinie) {
 
-    Handle(TopOpeBRepDS_Interference) I = DSCIL.Last();
+    const Handle(TopOpeBRepDS_Interference)& I = DSCIL.Last();
     TopOpeBRepDS_Transition LIT = I->Transition();
     Standard_Boolean LITonsort = M_FORWARD( LIT.Orientation(TopAbs_OUT) );
     Standard_Boolean LprecIsEntrant = !LITonsort;
@@ -470,7 +470,7 @@ Standard_Boolean FUNBREP_topogline_new
 
       // we have to parametrize the found interference (parameter PIfound)
       // and next interference (parline)
-      Handle(TopOpeBRepDS_Interference) Ifound = DSCIL.First();
+      const Handle(TopOpeBRepDS_Interference)& Ifound = DSCIL.First();
       Standard_Real PIfound = TopOpeBRepDS_InterferenceTool::Parameter(Ifound);
       FUNBREP_Periodize(L,Ifound,PIfound,parline);
       TopOpeBRepDS_InterferenceTool::Parameter(Ifound,PIfound);      
index 1e5338e88a91e695799e1188f67caac245f819d5..14f1519c687152fa9251e182f6bddce1dd2d1861 100644 (file)
@@ -351,7 +351,7 @@ static Standard_Boolean FUN_LineRestF
 
 //-----------------------------------------------------------------------
 Standard_EXPORT Standard_Boolean FUN_newtransEdge
-(const Handle(TopOpeBRepDS_HDataStructure) HDS,
+(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
  const TopOpeBRep_FacesFiller& FF,
  const TopOpeBRep_LineInter& L,
  const Standard_Boolean& Lonrest,
@@ -363,7 +363,7 @@ Standard_EXPORT Standard_Boolean FUN_newtransEdge
 {
   T.Before(TopAbs_UNKNOWN); T.After(TopAbs_UNKNOWN);
   const TopoDS_Face& OOface = FF.Face(OOShapeIndex);
-  TopoDS_Face FIE = OOface;
+  const TopoDS_Face& FIE = OOface;
   {
     TopAbs_Orientation oFIE = FIE.Orientation();
     if (oFIE == TopAbs_INTERNAL || oFIE == TopAbs_EXTERNAL) {
@@ -454,7 +454,7 @@ Standard_EXPORT Standard_Boolean FUN_newtransEdge
 } // FUN_newtransEdge
 
 //-----------------------------------------------------------------------
-static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure) HDS,
+static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure)& HDS,
                               const TopOpeBRepDS_ListOfInterference& loI, TopOpeBRepDS_ListOfInterference& loIfound)
 //-----------------------------------------------------------------------
 {
@@ -512,7 +512,7 @@ static Standard_Boolean FUN_sameGsameS(const TopOpeBRepDS_ListOfInterference& lo
   //  geometry <G>, and support <S>
   TopOpeBRepDS_PointIterator PI(loI);   
   for (; PI.More(); PI.Next()) {
-    Handle(TopOpeBRepDS_Interference) EPI = PI.Value();    
+    const Handle(TopOpeBRepDS_Interference)& EPI = PI.Value();
     Standard_Integer GEPI = EPI->Geometry(); Standard_Integer SEPI = EPI->Support();      
     if (GEPI == G && SEPI == S) loIfound.Append(EPI);
   }
index 8369bcfb0c19bd6144f411f3a56d5207c963fdbc..20d732fbd20c4be004ad17c0c910818cb449b8a1 100644 (file)
@@ -265,7 +265,7 @@ void TopOpeBRepBuild_Builder1::GFillShellSFS (const TopoDS_Shape& SH,
   
   TopOpeBRepTool_ShapeExplorer exFace;
 
-  TopoDS_Shape SH1 = SH;// SH1.Orientation(TopAbs_FORWARD);
+  const TopoDS_Shape& SH1 = SH;// SH1.Orientation(TopAbs_FORWARD);
   
   //1) process firstly same domain faces and non-interference faces
   for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) {
@@ -289,7 +289,7 @@ void TopOpeBRepBuild_Builder1::GFillShellSFS (const TopoDS_Shape& SH,
 
   //2 Process all other faces
   for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) {
-    TopoDS_Shape FOR = exFace.Current();
+    const TopoDS_Shape& FOR = exFace.Current();
     if(!myDataStructure -> HasShape(FOR)
        ||
        myDataStructure->HasSameDomain(FOR))
@@ -421,7 +421,7 @@ void TopOpeBRepBuild_Builder1::GFillWireNotSameDomWES(const TopoDS_Shape& W,
   TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
   Standard_Boolean RevOri1 = G1.IsToReverse1();
 
-  TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD);
+  const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD);
 
   TopOpeBRepTool_ShapeExplorer exEdge(WW,TopAbs_EDGE);
   for (; exEdge.More(); exEdge.Next()) {
@@ -518,7 +518,7 @@ void TopOpeBRepBuild_Builder1::GFillFaceSameDomSFS(const TopoDS_Shape& FOR,
   if(myDataStructure -> DS().AncestorRank(FOR) != 1)
     return;
 
-  TopOpeBRepBuild_GTopo G1 = Gin;
+  const TopOpeBRepBuild_GTopo& G1 = Gin;
 
   TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
 
@@ -696,7 +696,7 @@ void TopOpeBRepBuild_Builder1::GFillWireSameDomWES(const TopoDS_Shape& W,
 {
   TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
 
-  TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD);
+  const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD);
 
   Standard_Integer iref = myDataStructure -> DS().AncestorRank(W);
 
index 498fe590b001ee1493d1102077168f198aa60dbc..7ec0ae15a654cda68fc64547110904c154461f42 100644 (file)
@@ -488,7 +488,7 @@ void DumpMapOfShapeWithState (const Standard_Integer iP,
        ////// aSplFacesState in order to propagate the state for faces.
        nE=anEdgesToRestMap.Extent();
        for (k=1; k<=nE; k++) {
-         const TopoDS_Shape anEdge=anEdgesToRestMap(k);
+         const TopoDS_Shape& anEdge=anEdgesToRestMap(k);
          if (aMapOfShapeWithState.Contains (anEdge)) {
            const TopOpeBRepDS_ShapeWithState& aSWS=aMapOfShapeWithState.FindFromKey(anEdge);
            TopAbs_State aState=aSWS.State();
index 9c1054aa0fb7a57d59803e905deb0224a1a74afa..fb4954f3ef30504472d119b881a7a606e428099c 100644 (file)
@@ -260,7 +260,7 @@ TopOpeBRepBuild_CorrectFace2d::TopOpeBRepBuild_CorrectFace2d()
     anEdgeExists=0;  
     aWExp.Init(aWire, TopAbs_EDGE);
     for (; aWExp.More(); aWExp.Next()) {
-      TopoDS_Shape anEdge=aWExp.Current();
+      const TopoDS_Shape& anEdge=aWExp.Current();
       if (myCopyAvoidMap.Contains(anEdge)) {
        anEdgeExists=1;
        break;
@@ -346,7 +346,7 @@ TopOpeBRepBuild_CorrectFace2d::TopOpeBRepBuild_CorrectFace2d()
   
   aWExp.Init(myCurrentWire, TopAbs_EDGE);
   for (; aWExp.More(); aWExp.Next(), aNbEdges++) {
-    TopoDS_Shape anEdge=aWExp.Current(); 
+    const TopoDS_Shape& anEdge=aWExp.Current(); 
     if (aCopyAvoidMap.Contains(anEdge))
       anAvoidMap.Add(anEdge);
   }
index 2baa392faffce15f04e525e85bd26d03bdb3f339..7112add40f2982dc4c4abbe24ea5f403c6f5f2a7 100644 (file)
@@ -637,7 +637,7 @@ static Standard_Boolean FUN_validF1edge(const TopoDS_Shape& F)
   if(tSPS) debfille(iE);
 #endif
   
-  TopOpeBRepBuild_GTopo GME = G1;
+  const TopOpeBRepBuild_GTopo& GME = G1;
   GMergeEdgeWES(EOR,GME,WES);
   
   TopOpeBRepBuild_GTopo GSE = G1;
index d6183fadc5b0ba805d7b1fc45bbeb49eb9518b14..59250b94fb96a599dfb91daf82ede61205201620 100644 (file)
@@ -79,7 +79,7 @@ Standard_EXPORT void TopOpeBRepDS_SetThePCurve
 //(const TopoDS_Face& fF,const TopoDS_Edge& E,Standard_Real& splitpar);
 
 //---------------------------------------------
-static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure) HDS,Standard_Integer& iEinterf)
+static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,Standard_Integer& iEinterf)
 //---------------------------------------------
 {
   TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI);
@@ -119,7 +119,7 @@ static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterf
 #define DECREASEPERIOD (-1)
        
 static Standard_Boolean FUN_EPIforEvisoONperiodicF
-(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure) HDS,TopOpeBRepDS_ListOfInterference& loCPI)
+(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopOpeBRepDS_ListOfInterference& loCPI)
 {
   Standard_Real parone=-1.e7;   
   TopOpeBRepTool_CORRISO CORRISO(F); CORRISO.Init(F);
index 07a1771604d69fce9b4baf937e345f289fef0eb1..4c353a2dfaa5b29a44447a38ea1dd1a6cd5a2165 100644 (file)
@@ -144,7 +144,7 @@ static void CorrectUnclosedWire(TopoDS_Shape& aWire)
   for(i = 1; i <= nbVer; i++) {
     const TopTools_ListOfShape& Elist = VElists.FindFromIndex(i);
     if(Elist.Extent() == 1) {
-      TopoDS_Shape anEdge = Elist.First();
+      const TopoDS_Shape& anEdge = Elist.First();
 //      std::cout << "Remove redundant edge" << std::endl;
       BB.Remove(aWire, anEdge);
     }
@@ -345,7 +345,7 @@ void TopOpeBRepBuild_Builder::MakeSolids(TopOpeBRepBuild_SolidBuilder& SOBU,TopT
       else {
        myBuildTool.MakeShell(newShell);
        for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) {
-         TopoDS_Shape F = SOBU.Face();
+         const TopoDS_Shape& F = SOBU.Face();
          myBuildTool.AddShellFace(newShell,F);
        }
       }
@@ -369,7 +369,7 @@ void TopOpeBRepBuild_Builder::MakeShells(TopOpeBRepBuild_SolidBuilder& SOBU,TopT
     else {
       myBuildTool.MakeShell(newShell);
       for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) {
-       TopoDS_Shape F = SOBU.Face();
+       const TopoDS_Shape& F = SOBU.Face();
        myBuildTool.AddShellFace(newShell,F);
       }
     }
@@ -413,7 +413,7 @@ void TopOpeBRepBuild_Builder::MakeFaces(const TopoDS_Shape& aFace,TopOpeBRepBuil
       else {
        myBuildTool.MakeWire(newWire);
        for(FABU.InitEdge(); FABU.MoreEdge(); FABU.NextEdge()) {
-         TopoDS_Shape E = FABU.Edge();
+         const TopoDS_Shape& E = FABU.Edge();
          if (hns) myBuildTool.UpdateSurface(E,aFace,newFace);
          myBuildTool.AddWireEdge(newWire,E);
        }
index 30bda5260c80d1b6c2512be3ab915c3a2baddf90..99266bb619aa416d3be93be602c44a310bb4d4cb 100644 (file)
@@ -400,8 +400,8 @@ const Standard_Real PAR_T = 0.43213918;
                                                     const TopoDS_Edge& anEdgeObj,
                                                     gp_Vec& aNormal)
 {
-  TopoDS_Edge aEd=anEdgeObj;
-  TopoDS_Face aFS=aFObj;
+  const TopoDS_Edge& aEd=anEdgeObj;
+  const TopoDS_Face& aFS=aFObj;
   Standard_Real f2 = 0., l2 = 0., tolpc = 0., f = 0., l = 0., par = 0.;
   Handle(Geom2d_Curve) C2D=FC2D_CurveOnSurface(aEd,aFS,f2,l2,tolpc, Standard_True);
 
@@ -551,7 +551,7 @@ Standard_Boolean TopOpeBRepBuild_Tools::GetTangentToEdgeEdge (const TopoDS_Face&
 Standard_Boolean TopOpeBRepBuild_Tools::GetTangentToEdge (const TopoDS_Edge& anEdgeObj,
                                                          gp_Vec& aTangent)
 {
-  TopoDS_Edge aEd=anEdgeObj;
+  const TopoDS_Edge& aEd=anEdgeObj;
 
   Standard_Real f = 0., l = 0., par = 0.;
 
@@ -662,8 +662,8 @@ void TopOpeBRepBuild_Tools::UpdateEdgeOnPeriodicalFace(const TopoDS_Edge& aEdgeT
   Standard_Boolean DiffOriented = Standard_False;
   BRep_Builder BB; 
   TopoDS_Edge newE = aEdgeToUpdate; //newE.Orientation(TopAbs_FORWARD);
-  TopoDS_Face fFace = fromFace;   //fFace.Orientation(TopAbs_FORWARD);
-  TopoDS_Face tFace = toFace; //tFace.Orientation(TopAbs_FORWARD);
+  const TopoDS_Face& fFace = fromFace;   //fFace.Orientation(TopAbs_FORWARD);
+  const TopoDS_Face& tFace = toFace; //tFace.Orientation(TopAbs_FORWARD);
   Standard_Real fc = 0., lc = 0.;
 
   Handle(Geom2d_Curve) cc = BRep_Tool::CurveOnSurface(newE, tFace, fc, lc);
index 02c3dc66225925cd9350c8f5a69761927c99d968..12f64e5151c8f81ac88c55084843db7f8bb08f4e 100644 (file)
@@ -79,7 +79,7 @@ void TopOpeBRepBuild_Builder::GSOBUMakeSolids
        myBuildTool.MakeShell(newShell);
        nfa = SOBU.InitFace();
        for (; SOBU.MoreFace(); SOBU.NextFace()) {
-         TopoDS_Shape F = SOBU.Face();
+         const TopoDS_Shape& F = SOBU.Face();
          myBuildTool.AddShellFace(newShell,F);
        }
       }
index 9675131b9d1f9a4b8582727d16be3fedfaa8a432..eb015b0908ee68e9aaa2712b0d69ae66c3d3fc0a 100644 (file)
@@ -250,7 +250,7 @@ void  TopOpeBRepDS_BuildTool::MakeEdge
     
     // Creation d'une arete avec PCurve connectee a la BDS Curve 
     // JYL 22-09-94
-    Handle(TopOpeBRepDS_Interference) I = C.GetSCI1();
+    const Handle(TopOpeBRepDS_Interference)& I = C.GetSCI1();
     Handle(TopOpeBRepDS_SurfaceCurveInterference) SCI;
     SCI=Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast(I);
     Standard_Integer iS = SCI->Support();
@@ -569,8 +569,8 @@ void  TopOpeBRepDS_BuildTool::ApproxCurves
 //purpose  : 
 //=======================================================================
 Standard_Boolean FUN_getUV
-(const Handle(Geom_Surface) surf,
- const Handle(Geom_Curve) C3D,
+(const Handle(Geom_Surface)& surf,
+ const Handle(Geom_Curve)& C3D,
  const Standard_Real par3d,
  Standard_Real& u0,
  Standard_Real& v0)
@@ -609,7 +609,7 @@ Standard_Boolean FUN_reversePC
 }
 Standard_Boolean FUN_makeUisoLineOnSphe
 (const TopoDS_Face& F, // with geometry the spherical surface
- const Handle(Geom_Curve) C3D, 
+ const Handle(Geom_Curve)& C3D, 
  Handle(Geom2d_Curve) PCnew,
  const Standard_Real tol3d)
 {
@@ -743,13 +743,13 @@ void  TopOpeBRepDS_BuildTool::PutPCurves
 {
 
   TopoDS_Face& F1 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape1())));
-  Handle(Geom2d_Curve) PC1 = newC.Curve1();
+  const Handle(Geom2d_Curve)& PC1 = newC.Curve1();
   if (!PC1.IsNull() && comppc1) {
     PCurve(F1,E,PC1);
   }
   
   TopoDS_Face& F2 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape2())));
-  Handle(Geom2d_Curve) PC2 = newC.Curve2();
+  const Handle(Geom2d_Curve)& PC2 = newC.Curve2();
   if (!PC2.IsNull() && comppc2) {
     PCurve(F2,E,PC2);
   }
@@ -1191,7 +1191,7 @@ void  TopOpeBRepDS_BuildTool::PCurve(TopoDS_Shape& F,
     TopoDS_Face FF = TopoDS::Face(F);
     TopoDS_Edge EE = TopoDS::Edge(E);
 
-    Handle(Geom2d_Curve) PCT = PC;
+    const Handle(Geom2d_Curve)& PCT = PC;
     Standard_Real    CDSmin,CDSmax;
     Standard_Boolean rangedef = CDS.Range(CDSmin,CDSmax);
 
index 7c76e981497846489ced27ab20708c2f20c809af..c4011210c74adc512bbc8c58e83540f4a652ecfa 100644 (file)
@@ -291,7 +291,7 @@ Standard_EXPORT void FUN_resolveFUNKNOWN
         //      to determine transition relatively solid rather then face
         //      if possible (see pb. in CFE002 C2, when SIX==13)
         Standard_Integer rankFS = BDS.AncestorRank(S1);
-        TopoDS_Shape aSRef = BDS.Shape(rankFS);
+        const TopoDS_Shape& aSRef = BDS.Shape(rankFS);
         TopExp_Explorer ex(aSRef,TopAbs_SOLID);
         if (ex.More()) {
           pClass = pClassif;
index d87c9d7a854819b99f2bd3e95c737db32e0782c6..b21735f17992416028e98feb5d343e256ba7dfbd 100644 (file)
@@ -333,7 +333,7 @@ Standard_Integer TopOpeBRepTool_TOOL::OnBoundary(const Standard_Real par, const
 
 
 
-static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge E)
+static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge& E)
 {
   TopTools_DataMapOfIntegerShape mapiv;// mapiv.Find(iV) = V
   TColStd_IndexedMapOfReal mappar;     // mappar.FindIndex(parV) = iV
index b1ab7c4929c62a49a791686a34b64034a7698c21..65aa4faf93df8071f7e1a520e529de22a4549024 100644 (file)
@@ -35,7 +35,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an empty Iterator.
-  TopoDS_Iterator() {}
+  TopoDS_Iterator() : myOrientation(TopAbs_FORWARD) {}
 
   //! Creates an Iterator on <S> sub-shapes.
   //! Note:
index 673e55459a47d81b2f4548c15726528064bf63ad..e21537d1d1ba030733e40b3879ff387d42e38d23 100644 (file)
@@ -109,8 +109,8 @@ const Handle(TColStd_HSequenceOfTransient)& TopoDSToStep_WireframeBuilder::Value
 #define Nbpt 23
 
 static Handle(StepGeom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_Curve) &C,
-                                                      const Handle(StepGeom_CartesianPoint) P1, 
-                                                      const Handle(StepGeom_CartesianPoint) P2, 
+                                                      const Handle(StepGeom_CartesianPoint)& P1,
+                                                      const Handle(StepGeom_CartesianPoint)& P2,
                                                       Standard_Real trim1,
                                                       Standard_Real trim2,
                                                       Standard_Boolean sense)
@@ -209,7 +209,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
     {
       return Standard_False;
     }
-    Handle(StepGeom_Curve) aPMSC = aGTSMC.Value();
+    const Handle(StepGeom_Curve)& aPMSC = aGTSMC.Value();
 
     // trim the curve
     Standard_Real aTrim1 = aCA.FirstParameter();
index b23b49de1b32158fe94ba223220c5821280c686a..1fba56d936f1110e0ff191d57669a23bca834565 100644 (file)
@@ -179,9 +179,9 @@ NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>& Transf
 
   NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
   for (; iter.More(); iter.Next()) {
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
     if (!name.StartsWith(fromname)) continue;
-    Handle(Standard_Transient) atr = iter.Value();
+    const Handle(Standard_Transient)& atr = iter.Value();
     Handle(Standard_Transient) newatr = atr;
 
 //    Copy ? according type
index 05232fed00976d49765f9bfd1f8a9fe9d3654393..6024faef9711da675a7c83047f2946fe628b7b26 100644 (file)
@@ -37,7 +37,7 @@ Transfer_TransferInput::Transfer_TransferInput ()    {  }
 {
   Interface_EntityIterator iter;
   for (list.Start(); list.More(); list.Next()) {
-    Handle(Transfer_Binder) binder = list.Value();
+    const Handle(Transfer_Binder)& binder = list.Value();
     if (binder.IsNull()) continue;
     if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) continue;
 
index 1bd7d194c1b8504edce550b7bc2a3879aef5d603..f62c60b13af5545aa727a7385706cac18633e24a 100644 (file)
@@ -93,7 +93,7 @@ void Transfer_TransferOutput::TransferRoots (const Handle(Interface_Protocol)& p
   Interface_EntityIterator list = tool.RootEntities();
   Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
   for (list.Start(); list.More() && aPS.More(); list.Next()) {
-    Handle(Standard_Transient) ent = list.Value();
+    const Handle(Standard_Transient)& ent = list.Value();
 //    Standard_Integer scope = 0;
 //    if (thescope) scope = theproc->NewScope (ent);
     if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
@@ -110,7 +110,7 @@ void Transfer_TransferOutput::TransferRoots (const Interface_Graph& G,
   Interface_EntityIterator list = tool.RootEntities();
   Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
   for (list.Start(); list.More() && aPS.More(); list.Next()) {
-    Handle(Standard_Transient) ent = list.Value();
+    const Handle(Standard_Transient)& ent = list.Value();
 //    Standard_Integer scope = 0;
 //    if (thescope) scope = theproc->NewScope (ent);
     if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
index b3830b11828f4a51013cf8d21750f80de1721b60..070a1ed8559361475342bca6252d28c7269fa0af 100644 (file)
@@ -109,7 +109,7 @@ static void  ShapeAppend
     (roots ? TP->RootResult() : TP->CompleteResult());
 
   for (list.Start(); list.More(); list.Next()) {
-    Handle(Transfer_Binder) binder = list.Value();
+    const Handle(Transfer_Binder)& binder = list.Value();
     ShapeAppend (binder,shapes);
   }
   return shapes;
@@ -320,7 +320,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
   nchl.SetModel(model);
   for (chl.Start(); chl.More(); chl.Next()) {
     Standard_Integer num = 0;
-    Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     DeclareAndCast(Transfer_Finder,starting,ach->Entity());
     Handle(Standard_Transient) ent;
@@ -339,7 +339,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
 {
   Handle(TColStd_HSequenceOfTransient) ls = new TColStd_HSequenceOfTransient();
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
@@ -358,7 +358,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
 {
   Handle(TopTools_HSequenceOfShape) ls = new TopTools_HSequenceOfShape();
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
@@ -385,13 +385,13 @@ Interface_CheckIterator TransferBRep::BRepCheck
   Interface_CheckIterator nchl;
 
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
     if (S.IsNull()) {
       if (ent == obj) {
-       Handle(Interface_Check) bch(ach);  bch->SetEntity(ent);
+       const Handle(Interface_Check)& bch(ach);  bch->SetEntity(ent);
        nchl.Add (bch,0);
       }
     } else {
@@ -403,7 +403,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
       if (!sbs.IsNull()) sh = sbs->Result();
       if (!smp.IsNull()) sh = smp->Value();
       if (sh == S) {
-       Handle(Interface_Check) bch(ach);  bch->SetEntity(ent);
+       const Handle(Interface_Check)& bch(ach);  bch->SetEntity(ent);
        nchl.Add (bch,0);
       }
     }
index f8465da8e95ea19693cee161ec685ddb16e848f4..bfcba500c74275cff61ea8c0d65a1c6fa9c7f891 100644 (file)
@@ -186,10 +186,9 @@ void Units_UnitSentence::SetUnits
   Handle(Units_Unit) unit;
   TCollection_AsciiString symbol;
 
-  Handle(Units_QuantitiesSequence) quantitiessequence = aquantitiessequence;
-
-  for(index=1; index<=quantitiessequence->Length(); index++) {
-    quantity = quantitiessequence->Value(index);
+  for(index=1; index<=aquantitiessequence->Length(); index++)
+  {
+    quantity = aquantitiessequence->Value(index);
     unitssequence=quantity->Sequence();
     for(jindex=1; jindex<=unitssequence->Length(); jindex++) {
       unit = unitssequence->Value(jindex);
index 0d9fe25ead6637cd443aa72a09a264351dc162b9..9fb0cfea5ac3144952f678c25a58352a4dc98f88 100644 (file)
@@ -696,7 +696,7 @@ void ViewerTest::Clear()
   NCollection_Sequence<Handle(AIS_InteractiveObject)> aListRemoved;
   for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anObjIter (GetMapOfAIS()); anObjIter.More(); anObjIter.Next())
   {
-    const Handle(AIS_InteractiveObject) anObj = anObjIter.Key1();
+    const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key1();
     if (anObj->GetContext() != TheAISContext())
     {
       continue;
@@ -3363,7 +3363,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
     // redisplay all objects in context
     for (ViewTest_PrsIter aPrsIter (aNames); aPrsIter.More(); aPrsIter.Next())
     {
-      Handle(AIS_InteractiveObject)  aPrs = aPrsIter.Current();
+      const Handle(AIS_InteractiveObject)&  aPrs = aPrsIter.Current();
       if (!aPrs.IsNull())
       {
         aCtx->Redisplay (aPrs, Standard_False);
@@ -3612,7 +3612,7 @@ static int VDonly2 (Draw_Interpretor& ,
       continue;
     }
 
-    if (Handle(AIS_InteractiveObject) aShape = anIter.Key1())
+    if (const Handle(AIS_InteractiveObject)& aShape = anIter.Key1())
     {
       aCtx->Erase (aShape, Standard_False);
     }
@@ -3884,7 +3884,7 @@ int VErase (Draw_Interpretor& theDI,
     for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
          anIter.More(); anIter.Next())
     {
-      const Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+      const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
       if (!anIO.IsNull()
        && aCtx->IsSelected (anIO))
       {
@@ -3907,7 +3907,7 @@ int VErase (Draw_Interpretor& theDI,
     for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
          anIter.More(); anIter.Next())
     {
-      Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+      const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
       if (!anIO.IsNull())
       {
         if (toEraseInView)
@@ -4156,7 +4156,7 @@ int VBounding (Draw_Interpretor& theDI,
     for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
          anIter.More(); anIter.Next())
     {
-      Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+      const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
       aHighlightedMode = checkMode (aCtx, anIO, aMode);
       if (aHighlightedMode != -1)
       {
index 69481addee3eb31736b377b3a304554df3ced7b9..a28963a606b1f16a3acfb5a35ac68f325891ebc5 100644 (file)
@@ -1310,7 +1310,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
 
       // Construction of AIS_Plane
       GC_MakePlane MkPlane (A,B,C);
-      Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+      const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
       Handle(AIS_Plane)  anAISPlane = new AIS_Plane (aGeomPlane);
       GetMapOfAIS().Bind (anAISPlane, aName);
       if (argc == 6)
@@ -1494,7 +1494,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
             gp_Pnt aBa = BRep_Tool::Pnt(aVBa);
             gp_Pnt aBb = BRep_Tool::Pnt(aVBb);
             GC_MakePlane MkPlane (A, aBa, aBb);
-            Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+            const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
             Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
             GetMapOfAIS().Bind (anAISPlane, aName);
             TheAISContext()->Display (anAISPlane, Standard_True);
@@ -1521,7 +1521,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
           gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(aShapeB));
           gp_Pnt C = BRep_Tool::Pnt(TopoDS::Vertex(aShapeC));
           GC_MakePlane MkPlane(A, B, C);
-          Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+          const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
           Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
           GetMapOfAIS().Bind (anAISPlane, aName);
           TheAISContext()->Display (anAISPlane, Standard_True);
@@ -1565,7 +1565,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
         gp_Pnt Aa = BRep_Tool::Pnt(aVAa);
         gp_Pnt Ab = BRep_Tool::Pnt(aVAb);
         GC_MakePlane MkPlane (B,Aa,Ab);
-        Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+        const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
         Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
         GetMapOfAIS().Bind (anAISPlane ,aName);
         TheAISContext()->Display (anAISPlane, Standard_True);
@@ -3345,7 +3345,7 @@ private:
   virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
                                  const Standard_Integer theMode) Standard_OVERRIDE;
 
-  bool CheckInputCommand (const TCollection_AsciiString theCommand,
+  bool CheckInputCommand (const TCollection_AsciiString& theCommand,
                           const Handle(TColStd_HArray1OfAsciiString)& theArgsArray,
                           Standard_Integer &theArgIndex,
                           Standard_Integer theArgCount,
@@ -3655,7 +3655,7 @@ void MyPArrayObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel
   }
 }
 
-bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString theCommand,
+bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString& theCommand,
                                        const Handle(TColStd_HArray1OfAsciiString)& theArgsArray,
                                        Standard_Integer &theArgIndex,
                                        Standard_Integer theArgCount,
index 1e4b15f9d05abd52fd7be6bb04221143415cab70..52fe660b727983cab69f2ff4b1364699dc1d00f9 100644 (file)
@@ -747,7 +747,7 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI,
   for (NCollection_Sequence<Graphic3d_NameOfMaterial>::Iterator aMatIter (aMatList); aMatIter.More(); aMatIter.Next(), ++aMatIndex)
   {
     Graphic3d_MaterialAspect aMat (aMatIter.Value());
-    const TCollection_AsciiString aMatName = aMat.StringName();
+    const TCollection_AsciiString& aMatName = aMat.StringName();
     const Graphic3d_Vec3 anAmbient  = (Graphic3d_Vec3 )aMat.AmbientColor();
     const Graphic3d_Vec3 aDiffuse   = (Graphic3d_Vec3 )aMat.DiffuseColor();
     const Graphic3d_Vec3 aSpecular  = (Graphic3d_Vec3 )aMat.SpecularColor();
index 15ad3942b30bb711a7d89c385ccf69e105cbc0bd..79f59ac43ff7b4d9c43dbb912bfcde14c3cd8ea3 100644 (file)
@@ -1470,7 +1470,7 @@ static TCollection_AsciiString FindViewIdByWindowHandle (Aspect_Drawable theWind
 void ActivateView (const TCollection_AsciiString& theViewName,
                    Standard_Boolean theToUpdate = Standard_True)
 {
-  if (const Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName))
+  if (const Handle(V3d_View)& aView = ViewerTest_myViews.Find1(theViewName))
   {
     ViewerTest::ActivateView (aView, theToUpdate);
   }
@@ -1483,7 +1483,7 @@ void ActivateView (const TCollection_AsciiString& theViewName,
 void ViewerTest::ActivateView (const Handle(V3d_View)& theView,
                                Standard_Boolean theToUpdate)
 {
-  Handle(V3d_View) aView = theView;
+  const Handle(V3d_View)& aView = theView;
   const TCollection_AsciiString* aViewName = ViewerTest_myViews.Seek2 (aView);
   if (aViewName == nullptr)
   {
@@ -1538,7 +1538,7 @@ void ViewerTest::RemoveView (const Handle(V3d_View)& theView,
     return;
   }
 
-  const TCollection_AsciiString aViewName = ViewerTest_myViews.Find2 (theView);
+  const TCollection_AsciiString& aViewName = ViewerTest_myViews.Find2 (theView);
   RemoveView (aViewName, theToRemoveContext);
 }
 
@@ -7147,7 +7147,7 @@ static Standard_Integer V2DMode (Draw_Interpretor&, Standard_Integer theArgsNb,
      && anArgCase == "-name")
     {
       ViewerTest_Names aViewNames (theArgVec[++anArgIt]);
-      TCollection_AsciiString aViewName = aViewNames.GetViewName();
+      const TCollection_AsciiString& aViewName = aViewNames.GetViewName();
       if (!ViewerTest_myViews.IsBound1 (aViewName))
       {
         Message::SendFail() << "Syntax error: unknown view '" << theArgVec[anArgIt - 1] << "'";
@@ -8842,7 +8842,7 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons
         else if (!toOverrideGlobal
                && ViewerTest_myViews.IsBound1 (anEntityName))
         {
-          Handle(V3d_View) aView = ViewerTest_myViews.Find1 (anEntityName);
+          const Handle(V3d_View)& aView = ViewerTest_myViews.Find1 (anEntityName);
           if (toSet)
           {
             aView->AddClipPlane (aClipPlane);
index a263c23bbdf493bf025c589c090d1f6ba4447fe2..44562e34380ce1dcce9e0804dbad0f1b72eb30d6 100644 (file)
@@ -228,7 +228,7 @@ VrmlData_ErrorStatus VrmlData_Scene::readLine(VrmlData_InBuffer& theBuffer)
     {
       return VrmlData_UnrecoverableError;
     }
-    theBuffer.Input.seekg(-(aNbChars - anInd - 1), std::ios::cur);
+    theBuffer.Input.seekg(-static_cast<std::streamoff>((aNbChars - anInd - 1)), std::ios::cur);
   }
 
   // Check the reading status.
index e0a23ed09faa660a4fae78142a639453789a0da0..9aa2b20c8b760fde650fbbdb5cfeb1ffdcbd9805 100644 (file)
@@ -100,7 +100,7 @@ Standard_Boolean XCAFDoc_ClippingPlaneTool::GetClippingPlane(const TDF_Label& th
 //purpose  : 
 //=======================================================================
 
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
 {
   TDF_Label aLabel;
   TDF_LabelSequence aClippingPlanes;
@@ -149,7 +149,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, co
 //purpose  : 
 //=======================================================================
 
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const
 {
   TDF_Label aLabel = AddClippingPlane(thePlane, theName);
   Standard_Integer aCappingVal = (theCapping) ? 1 : 0;
@@ -206,7 +206,7 @@ void XCAFDoc_ClippingPlaneTool::GetClippingPlanes(TDF_LabelSequence& theLabels)
 //=======================================================================
 
 void XCAFDoc_ClippingPlaneTool::UpdateClippingPlane(const TDF_Label& theLabel,
-  const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+  const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
 {
   if (theLabel.Father() != Label())
     return;
index 980fec6346d55e5c7d79ed65d2037230119bdb2b..f4f37ac8507be7710d58f90cb997a5bd35d2f34c 100644 (file)
@@ -60,7 +60,7 @@ public:
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
   //! is already defined)
-  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const;
+  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const;
 
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
@@ -70,7 +70,7 @@ public:
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
   //! is already defined)
-  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
 
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
@@ -87,7 +87,7 @@ public:
   
   //! Sets new value of plane and name to the given clipping plane label
   //! or do nothing, if the given label is not a clipping plane label
-  Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+  Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
 
   //! Set new value of capping for given clipping plane label
   Standard_EXPORT void SetCapping(const TDF_Label& theClippingPlaneL, const Standard_Boolean theCapping);
index 67b7691d5728ffebc3e55fe331efbb01db169c8d..78f66ed244ac278cb2caecaf0526f9ea6770f63c 100644 (file)
@@ -598,7 +598,7 @@ static Standard_Boolean prepareAssembly (const TopoDS_Shape& theShape,
     for (; Iterator.More(); Iterator.Next())
       aSubShapeSeq.Append(Iterator.Value());
     for (Standard_Integer i = 1; i <= aSubShapeSeq.Length(); i++) {
-      TopoDS_Shape Scomp = aSubShapeSeq.Value(i);
+      const TopoDS_Shape& Scomp = aSubShapeSeq.Value(i);
       TopoDS_Shape aNewScomp;
       B.Remove(theOUTShape, Scomp);
       prepareAssembly( Scomp, aNewScomp );
@@ -1199,7 +1199,7 @@ Standard_Boolean XCAFDoc_ShapeTool::AddSubShape(const TDF_Label &shapeL,
       TDF_LabelSequence aShapeLSeq;
       for (TopoDS_Iterator it(GetShape(shapeL)); it.More() && !isDefined; it.Next())
       {
-        TopoDS_Shape aShape = it.Value();
+        const TopoDS_Shape& aShape = it.Value();
         if (sub.IsSame(aShape.Located(TopLoc_Location())))
         {
           isDefined = Standard_True;
@@ -1463,7 +1463,7 @@ void XCAFDoc_ShapeTool::SetExternRefs(const TDF_Label& L,
   TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
   for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
     TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
-    Handle(TCollection_HAsciiString) str = SHAS(i);
+    const Handle(TCollection_HAsciiString)& str = SHAS(i);
     TCollection_ExtendedString extstr(str->String());
     TDataStd_Name::Set(tmplbl,extstr);
   }
@@ -1483,7 +1483,7 @@ TDF_Label XCAFDoc_ShapeTool::SetExternRefs(const TColStd_SequenceOfHAsciiString&
   TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
   for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
     TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
-    Handle(TCollection_HAsciiString) str = SHAS(i);
+    const Handle(TCollection_HAsciiString)& str = SHAS(i);
     TCollection_ExtendedString extstr(str->String());
     TDataStd_Name::Set(tmplbl,extstr);
   }
@@ -2253,7 +2253,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next())
   {
-    const TopoDS_Shape aShape = aShapeLabelIt.Key();
+    const TopoDS_Shape& aShape = aShapeLabelIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aShape)
 
     TCollection_AsciiString aShapeLabel;
@@ -2263,7 +2263,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next())
   {
-    const TopoDS_Shape aSubShape = aSubShapeIt.Key();
+    const TopoDS_Shape& aSubShape = aSubShapeIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSubShape)
 
     TCollection_AsciiString aSubShapeLabel;
@@ -2273,7 +2273,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next())
   {
-    const TopoDS_Shape aSimpleShape = aSimpleShapeIt.Key();
+    const TopoDS_Shape& aSimpleShape = aSimpleShapeIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSimpleShape)
 
     TCollection_AsciiString aSimpleShapeLabel;
index 509e2b7793bddfbd2bda4c6e8b5adec12ef89b7a..751cb5ca928bba5ef91f9411b032c259a5e4f6e2 100644 (file)
@@ -92,7 +92,7 @@ static Standard_Boolean ClearDicWS()
   return Standard_True;
 }
 
-static void AddWS(TCollection_AsciiString filename,
+static void AddWS(const TCollection_AsciiString& filename,
                   const Handle(XSControl_WorkSession)& WS)
 {
   WS->SetVars(new XSDRAW_Vars); // support of DRAW variables
@@ -111,14 +111,14 @@ static Standard_Boolean FillDicWS(NCollection_DataMap<TCollection_AsciiString, H
   NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>::Iterator DicEFIt(dicFile);
   for (; DicEFIt.More(); DicEFIt.Next())
   {
-    TCollection_AsciiString filename = DicEFIt.Key();
+    const TCollection_AsciiString& filename = DicEFIt.Key();
     EF = DicEFIt.Value();
     AddWS(filename, EF->GetWS());
   }
   return Standard_True;
 }
 
-static Standard_Boolean SetCurrentWS(TCollection_AsciiString filename)
+static Standard_Boolean SetCurrentWS(const TCollection_AsciiString& filename)
 {
   if (!thedictws.IsBound(filename)) return Standard_False;
   Handle(XSControl_WorkSession) CurrentWS =
@@ -161,7 +161,7 @@ static Standard_Integer GetDicWSList(Draw_Interpretor& di, Standard_Integer /*ar
   Standard_Integer num = 0;
   for (; DicIt.More(); DicIt.Next(), num++)
   {
-    TCollection_AsciiString strng(DicIt.Key());
+    const TCollection_AsciiString& strng(DicIt.Key());
     if (num) di << "\n";
     di << "\"" << strng.ToCString() << "\"";
   }
index eeb7a8bb3e8e1bc30b615e6204b1056f944564bf..827a6ddcffe64838401cce501a00f78342756637 100644 (file)
@@ -836,7 +836,7 @@ static Standard_Integer getAllStyledComponents (Draw_Interpretor& di, Standard_I
       BRep_Builder B;
       B.MakeCompound(aShape);
       for (Standard_Integer jj = 1; jj <= aShapes.Length(); jj++) {
-        TopoDS_Shape aCurShape = aShapes.Value(jj);
+        const TopoDS_Shape& aCurShape = aShapes.Value(jj);
         B.Add( aShape, aCurShape );
       }
       DBRep::Set ( argv[2], aShape );
index 5b9cd8b79cd2fd41b3be65fb249406b8b69e0012..332a392be520090bd0e81a854efdb21581addc1c 100644 (file)
@@ -284,7 +284,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::PerformFixShape(const TopoDS_Shape& S,
 // Purpose : for CheckPCurve
 // ============================================================================
 
-static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge edge)
+static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge& edge)
 {
   TopoDS_Edge result;
   //BRep_Builder B; // B not used - see below (skl)
index 1abd723766abe73f1157e6e9560fc5248b1bccec..233aea0a6c656defa20d151864e5ac1eaf58d670 100644 (file)
@@ -78,7 +78,7 @@ XSControl_ConnectedShapes::XSControl_ConnectedShapes ()
     if (sh.IsNull()) continue;
     if (sh.ShapeType() != type) continue;
     for (TopExp_Explorer vsh(sh,TopAbs_VERTEX); vsh.More(); vsh.Next()) {
-      TopoDS_Shape avtx = vsh.Current();
+      const TopoDS_Shape& avtx = vsh.Current();
       if (vtx.Contains(avtx)) {
        li->Append (TP->Mapped(i));
        break;  // break de ce for interieur, entite suivante
index d161a2c06476c8a1b85b924c4aafc179b999f750..f2e84fb20c8c9b3c22202297b02aff7821eb6f8d 100644 (file)
@@ -423,7 +423,7 @@ static IFSelect_ReturnStatus XSControl_fromshape
         sout<<std::endl<<"Subshapes imported from entities:";
         TopoDS_Iterator Iter(Shape);
         for (; Iter.More(); Iter.Next()) {
-          TopoDS_Shape subsh = Iter.Value();
+          const TopoDS_Shape& subsh = Iter.Value();
           Standard_Integer submodrec = 1;
           Handle(Standard_Transient) subent = TR->EntityFromShapeResult(subsh,submodrec);
           if (subent.IsNull()) {
index 02107b217682ecbe7dd351887b9071b29410e6cc..f93878ae4e5f949371e53f793666f24bcf7ca78d 100644 (file)
@@ -468,8 +468,7 @@ void XSControl_Reader::GetStatsTransfer (const Handle(TColStd_HSequenceOfTransie
   nbMapped = nbWithFail = nbWithResult = 0;
   
   for (itrp.Start(); itrp.More(); itrp.Next()) {
-    Handle(Transfer_Binder) binder = itrp.Value();
-    Handle(Standard_Transient) ent = itrp.Starting();
+    const Handle(Transfer_Binder)& binder = itrp.Value();
     nbMapped++;
     if (binder.IsNull())  nbWithFail++;
     else
index d1f73102bba31ea8d363f7b5fc1f4377b8cca8b5..ba6c8761d5200ad515155c751d46e80a79da61a5 100644 (file)
@@ -808,7 +808,7 @@ Standard_Integer XSControl_TransferReader::TransferOne
 
   //  seule difference entre TransferRoots et TransferOne
   Standard_Integer res = 0;
-  Handle(Standard_Transient) obj = ent;
+  const Handle(Standard_Transient)& obj = ent;
   TP.Transfer (obj, theProgress);
   if (theProgress.UserBreak())
     return res;
@@ -1197,8 +1197,8 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP
 
     for (itrp.Start(); itrp.More(); itrp.Next()) {
       nbi ++;
-      Handle(Transfer_Binder) binder = itrp.Value();
-      Handle(Standard_Transient) ent = itrp.Starting();
+      const Handle(Transfer_Binder)& binder = itrp.Value();
+      const Handle(Standard_Transient)& ent = itrp.Starting();
       if (binder.IsNull())  {
        nbnr ++;
        if (notrec) counter->Add(ent,"(not recorded)");
index 2df8058d79b76a480930a8aa18e0461f7d7ca265..304ec8110d14b2bb870a86de122c65ec5d45c1ce 100644 (file)
@@ -353,7 +353,7 @@ static const Standard_ExtString   voidext = { 0 };
   if (!compound || res != TopAbs_COMPOUND) return res;
   res = TopAbs_SHAPE;
   for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
-    TopoDS_Shape sh = iter.Value();
+    const TopoDS_Shape& sh = iter.Value();
     if (sh.IsNull()) continue;
     TopAbs_ShapeEnum typ = sh.ShapeType();
     if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
index 980be1f738420e3d11e510b14ea760a3ab8c7cc9..195159619f9ff0134269f49fc4de9459d3446a21 100644 (file)
@@ -552,7 +552,7 @@ static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_In
       return 0;
     }
     for (itrp.Start(); itrp.More(); itrp.Next()) {
-      Handle(Standard_Transient) ent = itrp.Starting();
+      const Handle(Standard_Transient)& ent = itrp.Starting();
       Handle(TColStd_HSequenceOfTransient) super = WS->Sharings (ent);
       if (!super.IsNull()) {
        Standard_Integer nb = super->Length();
index 51801a43135aa04155d0017c5690659766fbfdc6..52d127cc1c02cc922fba7a764fdc5fe3369a3dd2 100644 (file)
@@ -211,8 +211,8 @@ static Standard_Boolean MinimizeDirection(const math_Vector&   P0,
   tol1d /= 3; 
 
   //JR/Hp :
-  math_Vector PP0 = P0 ;
-  math_Vector PP1 = P1 ;
+  const math_Vector& PP0 = P0 ;
+  const math_Vector& PP1 = P1 ;
   Delta = PP1 - PP0;
   //  Delta = P1 - P0;
   invnorme = Delta.Norm();