0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
authorkgv <kgv@opencascade.com>
Sun, 31 Mar 2019 20:38:14 +0000 (23:38 +0300)
committerkgv <kgv@opencascade.com>
Sun, 31 Mar 2019 20:39:50 +0000 (23:39 +0300)
Add missing const& to catch statements.

106 files changed:
src/AIS/AIS_Axis.cxx
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_TexturedShape.cxx
src/AppBlend/AppBlend_AppSurf.gxx
src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx
src/BOPAlgo/BOPAlgo_Builder.cxx
src/BOPAlgo/BOPAlgo_CheckerSI.cxx
src/BOPAlgo/BOPAlgo_PaveFiller.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx
src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx
src/BOPAlgo/BOPAlgo_Tools.cxx
src/BOPTools/BOPTools_AlgoTools2D_1.cxx
src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepLib/BRepLib.cxx
src/BRepLib/BRepLib_FindSurface.cxx
src/BRepMesh/BRepMesh_NodeInsertionMeshAlgo.hxx
src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/BinObjMgt/BinObjMgt_Persistent.cxx
src/CDF/CDF_Application.cxx
src/CDF/CDF_StoreList.cxx
src/DNaming/DNaming_Line3DDriver.cxx
src/DNaming/DNaming_ModelingCommands.cxx
src/DNaming/DNaming_TransformationDriver.cxx
src/Draw/Draw_BasicCommands.cxx
src/Draw/Draw_Interpretor.cxx
src/Draw/Draw_Window.cxx
src/ExprIntrp/ExprIntrp.cxx
src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx
src/GeomAPI/GeomAPI_PointsToBSpline.cxx
src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx
src/GeomFill/GeomFill_Sweep.cxx
src/GeomLib/GeomLib_CheckCurveOnSurface.cxx
src/GeometryTest/GeometryTest_CurveCommands.cxx
src/IFSelect/IFSelect_WorkSession.cxx
src/IGESFile/IGESFile_Read.cxx
src/IGESSelect/IGESSelect_WorkLibrary.cxx
src/IGESToBRep/IGESToBRep_Actor.cxx
src/IGESToBRep/IGESToBRep_BasicCurve.cxx
src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx
src/IGESToBRep/IGESToBRep_Reader.cxx
src/IntImp/IntImp_ZerParFunc.lxx
src/IntPatch/IntPatch_SpecialPoints.cxx
src/Interface/Interface_FileReaderTool.cxx
src/LDOM/LDOM_CharReference.cxx
src/LDOM/LDOM_MemManager.cxx
src/LDOM/LDOM_XmlReader.cxx
src/LocOpe/LocOpe_SplitShape.cxx
src/PCDM/PCDM_ReadWriter.cxx
src/PCDM/PCDM_ReadWriter_1.cxx
src/QABugs/QABugs_10.cxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_13.cxx
src/QABugs/QABugs_16.cxx
src/QABugs/QABugs_17.cxx
src/QABugs/QABugs_19.cxx
src/QABugs/QABugs_2.cxx
src/QABugs/QABugs_20.cxx
src/QABugs/QABugs_5.cxx
src/Resource/Resource_Manager.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
src/ShapeCustom/ShapeCustom.cxx
src/ShapeCustom/ShapeCustom_Curve2d.cxx
src/ShapeFix/ShapeFix_FaceConnect.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeFix/ShapeFix_Wire_1.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx
src/StdPrs/StdPrs_Isolines.cxx
src/StdSelect/StdSelect_BRepSelectionTool.cxx
src/StdStorage/StdStorage.cxx
src/StdStorage/StdStorage_HeaderData.cxx
src/StdStorage/StdStorage_RootData.cxx
src/StdStorage/StdStorage_TypeData.cxx
src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx
src/Storage/Storage_HeaderData.cxx
src/Storage/Storage_RootData.cxx
src/Storage/Storage_Schema.cxx
src/TColStd/TColStd_PackedMapOfInteger.cxx
src/TDocStd/TDocStd_Application.cxx
src/TNaming/TNaming_Name.cxx
src/TObj/TObj_Model.cxx
src/TPrsStd/TPrsStd_ConstraintTools.cxx
src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx
src/Transfer/Transfer_TransferProcess.gxx
src/V3d/V3d_Viewer.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/VrmlData/VrmlData_Geometry.cxx
src/XDEDRAW/XDEDRAW_Props.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx
src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx
src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx
src/math/math_ComputeGaussPointsAndWeights.cxx
src/math/math_ComputeKronrodPointsAndWeights.cxx

index 8ae1383..aab1609 100644 (file)
@@ -81,7 +81,7 @@ myIsXYZAxis(Standard_True)
   Standard_Real aLength;
   try {
     aLength = UnitsAPI::AnyToLS(100. ,"mm");
-  } catch (Standard_Failure) {
+  } catch (Standard_Failure const&) {
     aLength = 0.1;
   }
   DA->SetAxisLength(aLength,aLength,aLength);
index 58fd0ea..e32aaf3 100755 (executable)
@@ -352,7 +352,7 @@ TCollection_ExtendedString AIS_Dimension::GetValueString (Standard_Real& theWidt
     Handle(Font_FTFont) aFont = new Font_FTFont();
     aFont->Init (aTextAspect->Aspect()->Font().ToCString(),
                  aTextAspect->Aspect()->GetTextFontAspect(),
-                 (const unsigned int)aTextAspect->Height(),
+                 (unsigned int )aTextAspect->Height(),
                  THE_2D_TEXT_RESOLUTION);
 
     for (NCollection_Utf8Iter anIter = anUTFString.Iterator(); *anIter != 0; )
index 4d9219c..1baa841 100644 (file)
@@ -425,7 +425,7 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
           updateAttributes (thePrs);
         }
       }
-      catch (Standard_Failure)
+      catch (Standard_Failure const&)
       {
 #ifdef OCCT_DEBUG
         std::cout << "AIS_TexturedShape::Compute() in ShadingMode failed \n";
index 213e0e8..174a4e6 100644 (file)
@@ -487,7 +487,7 @@ void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin,
       try {
        Variation.Approximate();
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
        return;
       }
 
index ac2a314..29c3535 100644 (file)
@@ -232,7 +232,7 @@ void BOPAlgo_ArgumentAnalyzer::Perform()
         TestCurveOnSurface();
     }
   }
-  catch(Standard_Failure) {
+  catch(Standard_Failure const&) {
     BOPAlgo_CheckResult aResult;
     aResult.SetCheckStatus(BOPAlgo_CheckUnknown);
     myResult.Append(aResult);
index 9c04e66..73b095a 100644 (file)
@@ -233,7 +233,7 @@ void BOPAlgo_Builder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
     PerformInternal1(theFiller);
   }
   //
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     AddError (new BOPAlgo_AlertBuilderFailed);
   }
 }
index 660e9aa..1f6dad6 100644 (file)
@@ -206,7 +206,7 @@ void BOPAlgo_CheckerSI::Perform()
     PostTreat();
   }
   //
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     AddError (new BOPAlgo_AlertIntersectionFailed);
   }
 }
index c48fca5..f4eb89a 100644 (file)
@@ -223,7 +223,7 @@ void BOPAlgo_PaveFiller::Perform()
     PerformInternal();
   }
   //
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     AddError (new BOPAlgo_AlertIntersectionFailed);
   } 
 }
index 331c97e..c9d101c 100644 (file)
@@ -118,7 +118,7 @@ class BOPAlgo_VertexEdge : public BOPAlgo_Algo {
 
       myFlag=myContext->ComputeVE (myV, myE, myT, myTolVNew, myFuzzyValue);
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertIntersectionFailed);
     }
index 43740b6..f653b78 100644 (file)
@@ -102,7 +102,7 @@ class BOPAlgo_EdgeEdge :
 
       IntTools_EdgeEdge::Perform();
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertIntersectionFailed);
     }
index 867b52e..34f1e51 100644 (file)
@@ -114,7 +114,7 @@ class BOPAlgo_VertexFace : public BOPAlgo_Algo {
 
       myFlag=myContext->ComputeVF(myV, myF, myT1, myT2, myTolVNew, myFuzzyValue);
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertIntersectionFailed);
     }
index 969ddce..bdbc8f6 100644 (file)
@@ -113,7 +113,7 @@ class BOPAlgo_EdgeFace :
 
       IntTools_EdgeFace::Perform();
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertIntersectionFailed);
     }
index e7c92ad..116a24d 100644 (file)
@@ -150,7 +150,7 @@ class BOPAlgo_FaceFace :
 
       IntTools_FaceFace::Perform(myF1, myF2);
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertIntersectionFailed);
     }
index c17b4c3..727fc8b 100644 (file)
@@ -301,7 +301,7 @@ class BOPAlgo_MPC : public BOPAlgo_Algo  {
         UpdateVertices(aCopyE, myF);
       }
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       AddError(new BOPAlgo_AlertBuildingPCurveFailed(TopoDS_Shape()));
     }
index e1db775..17e18bd 100644 (file)
@@ -155,7 +155,7 @@ void BOPAlgo_RemoveFeatures::Perform()
     // Post treatment
     PostTreat();
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     AddError(new BOPAlgo_AlertRemoveFeaturesFailed());
   }
@@ -354,7 +354,7 @@ public: //! @name Perform the operation
       // Trim the extended faces
       TrimExtendedFaces(aFaceExtFaceMap);
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       // Make sure the warning will be given on the higher level
       myHasAdjacentFaces = Standard_True;
index fb2b15b..1d0e217 100644 (file)
@@ -714,7 +714,7 @@ Standard_Boolean BOPAlgo_Tools::WiresToFaces(const TopoDS_Shape& theWires,
         aBB.Add(aRFaces, aFSp);
       }
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       continue;
     }
   }
index e6591cf..f4d2e30 100644 (file)
@@ -136,7 +136,7 @@ Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
     BRepLib::SameParameter(aE1T);
     BRepLib::SameRange(aE1T);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     iRet = 6;
     return iRet;
index 2ecc36d..2f05c1a 100644 (file)
@@ -326,7 +326,7 @@ void BRepBuilderAPI_FastSewing::Perform(void)
 
     myResShape = aQuilt.Shells();
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     SetStatus(FS_Exception);
 #ifdef OCCT_DEBUG
index 7d3db72..24114ff 100644 (file)
@@ -903,7 +903,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
     }
   }
   
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     isSamePar = Standard_False;
   }
@@ -4744,7 +4744,7 @@ void BRepBuilderAPI_Sewing::SameParameterShape()
 
       BRepLib::SameParameter(sec, BRep_Tool::Tolerance(sec));
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
 #ifdef OCCT_DEBUG
       cout << "Fail: BRepBuilderAPI_Sewing::SameParameterShape exception in BRepLib::SameParameter" << endl;
 #endif
index f6006c5..e475daf 100644 (file)
@@ -2297,7 +2297,7 @@ void BRepLib::EncodeRegularity(TopoDS_Edge& E,
       B.Continuity(E,F1,F2,aCont);
       
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
 #ifdef OCCT_DEBUG
       cout << "Failure: Exception in BRepLib::EncodeRegularity" << endl;
index 998176d..ae94225 100644 (file)
@@ -152,7 +152,7 @@ static Standard_Boolean Is2DClosed(const TopoDS_Shape&         theShape,
     TopoDS_Vertex aV2 = TopExp::LastVertex( aLastEdge, Standard_True );
     return ( aV1.IsSame( aV2 ) && Is2DConnected( aLastEdge, aFisrtEdge, theSurface, theLocation));
   }
-  catch ( Standard_Failure )  {
+  catch (Standard_Failure const&)  {
     return Standard_False;
   }
 }
index dc3c13e..54f80fd 100644 (file)
@@ -223,7 +223,7 @@ private:
       this->registerNode(BRep_Tool::Pnt(theVertex), aPnt2d,
                          BRepMesh_Fixed, Standard_False);
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
     }
   }
index e48a05c..45909cc 100644 (file)
@@ -347,7 +347,7 @@ static void ComputeMaxAngleOnShape(const TopoDS_Shape& S,
         {
           tgtfaces(E, F1, F2, couture, theResAngle);
         }
-        catch(Standard_Failure)
+        catch(Standard_Failure const&)
         {
         }
       }
@@ -562,7 +562,7 @@ TopoDS_Face BRepOffset_MakeSimpleOffset::BuildWallFace(const TopoDS_Edge& theOri
     if (aFM.IsDone())
       aF = aFM.Face();
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
   }
 
index 31f4979..763a460 100644 (file)
@@ -489,7 +489,7 @@ void BRepOffsetAPI_ThruSections::Build()
       CreateSmoothed();
     }
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     NotDone();
     return;
index 2aa131a..cf39837 100644 (file)
@@ -336,7 +336,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutCString
   alignOffset (1);
   Standard_Integer aSize = (Standard_Integer)(strlen (theValue) + 1);
   prepareForPut (aSize);
-  putArray ((void* const)theValue, aSize);
+  putArray ((void* )theValue, aSize);
   return *this;
 }
 
@@ -351,7 +351,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutAsciiString
   alignOffset (BP_INTSIZE, Standard_True);
   Standard_Integer aSize = theValue.Length() + 1;
   prepareForPut (aSize);
-  putArray ((void* const)theValue.ToCString(), aSize);
+  putArray ((void*)theValue.ToCString(), aSize);
   return *this;
 }
 
@@ -370,7 +370,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutExtendedString
   Standard_Integer aStartIndex = myIndex;
   Standard_Integer aStartOffset = myOffset;
 #endif
-  putArray ((void* const)theValue.ToExtString(), aSize);
+  putArray ((void* )theValue.ToExtString(), aSize);
 #if DO_INVERSE
   inverseExtCharData (aStartIndex, aStartOffset, aSize - BP_EXTCHARSIZE);
 #endif
index 99ff38a..482b70e 100644 (file)
@@ -162,7 +162,7 @@ PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString&
         if (aReader.IsNull())
           return PCDM_RS_NoDriver;
       }
-      catch (Standard_Failure)
+      catch (Standard_Failure const&)
       {
         // no need to report error, this was just check for availability
       }
index afd7511..38d89d8 100644 (file)
@@ -121,7 +121,7 @@ PCDM_StoreStatus CDF_StoreList::Store (Handle(CDM_MetaData)& aMetaData, TCollect
       }
     }
 
-    catch (CDF_MetaDataDriverError anException) {
+    catch (CDF_MetaDataDriverError const& anException) {
       CAUGHT(anException, aStatusAssociatedText, TCollection_ExtendedString("metadatadriver failed; reason:"));
       status = PCDM_SS_DriverFailure;
     }
index 1cc2c61..1b63152 100644 (file)
@@ -182,7 +182,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(Handle(TFunction_Logbook)& theLog
   try {  
     LoadNamingDS(aResultLabel, aWire, anArV, isClosed);
 
-  } catch (Standard_Failure) {
+  } catch (Standard_Failure const&) {
     aFunction->SetFailure(NAMING_FAILED);
     return -1;
   }
index 4c9a976..bdd474e 100644 (file)
@@ -74,7 +74,7 @@
 #ifdef _WIN32
 #define EXCEPTION ...
 #else
-#define EXCEPTION Standard_Failure
+#define EXCEPTION Standard_Failure const&
 #endif          
 #include <ModelDefinitions.hxx>
 //#define DEBUG
@@ -697,7 +697,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
            if(!aSelector.Select(aShape, aCONTEXT, aGeometry, aKeepOrientation))
              return 1;
          }
-          catch (Standard_Failure) {
+          catch (Standard_Failure const&) {
            cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
          }
     
@@ -774,7 +774,7 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
              if(!aSelector.Select(aShape, aCONTEXT, aGeometry, aKeepOrientation))
                return 1;
            }
-            catch (Standard_Failure) {
+            catch (Standard_Failure const&) {
              cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
            }
     
index 7128b65..a6cab05 100644 (file)
@@ -58,7 +58,7 @@ IMPLEMENT_STANDARD_RTTIEXT(DNaming_TransformationDriver,TFunction_Driver)
 #ifdef _WIN32
 #define EXCEPTION ...
 #else
-#define EXCEPTION Standard_Failure
+#define EXCEPTION Standard_Failure const&
 #endif 
 
 #define FACES_TAG  1
index f85f5ba..7d5be06 100644 (file)
@@ -323,7 +323,7 @@ static Standard_Integer dbreak(Draw_Interpretor& di, Standard_Integer, const cha
   try {
     OSD::ControlBreak();
   }
-  catch (OSD_Exception_CTRL_BREAK) {
+  catch (OSD_Exception_CTRL_BREAK const&) {
     di << "User pressed Control-Break";
     return 1; // Tcl exception
   }
index 4fce4f4..dc32d9c 100644 (file)
@@ -551,7 +551,7 @@ Draw_Interpretor::~Draw_Interpretor()
     OCC_CATCH_SIGNALS
     Tcl_Exit(0);
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
 #ifdef OCCT_DEBUG
     cout <<"Tcl_Exit have an exeption" << endl;
 #endif
index 55a659b..237cf93 100644 (file)
@@ -1105,7 +1105,7 @@ Standard_Boolean Init_Appli()
   try {
     OCC_CATCH_SIGNALS
     Tk_Init(interp) ;
-  } catch  (Standard_Failure) {
+  } catch  (Standard_Failure const&) {
     cout <<" Pb au lancement de TK_Init "<<endl;
   }
 
@@ -1135,7 +1135,7 @@ Standard_Boolean Init_Appli()
     {
       Draw_DisplayConnection = new Aspect_DisplayConnection();
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       std::cout << "Cannot open display. Interpret commands in batch mode." << std::endl;
       return Standard_False;
@@ -1293,7 +1293,7 @@ static void StdinProc(ClientData clientData, int )
 prompt:
   if (tty) Prompt(Draw::GetInterpretor().Interp(), gotPartial);
 
- } catch (Standard_Failure) {}
+ } catch (Standard_Failure const&) {}
 
 }
 
index be1178a..37437a6 100644 (file)
@@ -43,7 +43,7 @@ Standard_Boolean ExprIntrp::Parse(const Handle(ExprIntrp_Generator)& gen, const
       ExprIntrp_stop_string();
       return Standard_True;
     }
-    catch (Standard_Failure) {}
+    catch (Standard_Failure const&) {}
   }
   ExprIntrp_stop_string();
   return Standard_False;
index eec601a..eeec701 100644 (file)
@@ -437,7 +437,7 @@ void Geom2dAPI_PointsToBSpline::Init
   try {
     Variation.Approximate();
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     return;
   }
 
index 83b3854..1707422 100644 (file)
@@ -315,7 +315,7 @@ void GeomAPI_PointsToBSpline::Init
   try {
     Variation.Approximate();
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     return;
   }
 
index a055490..c016aa1 100644 (file)
@@ -353,7 +353,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColgp_Array2OfPnt& Points,
   try {
     Variation.Approximate();
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     return;
   }
 
@@ -413,7 +413,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColgp_Array2OfPnt& Points,
   try {
     Variation2.Approximate();
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     return;
   }
 
index d37105d..c64dd61 100644 (file)
@@ -608,7 +608,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
                    Tf(2,1), Tf(2,2), Tf(2,3), Tf(2,4),
                    Tf(3,1), Tf(3,2), Tf(3,3), Tf(3,4));
     }
-    catch (Standard_ConstructionError) {
+    catch (Standard_ConstructionError const&) {
       IsTrsf = Standard_False;
     }
     if (!IsTrsf) {
index a6f9333..3b1db78 100644 (file)
@@ -100,7 +100,7 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
       
       theFVal = -1.0*aP1.SquareDistance(aP2);
     }
-    catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
       return Standard_False;
     }
     //
@@ -157,7 +157,7 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
         *theDeriv2 = -2.0*(aVec2.SquareMagnitude() + aVec1.Dot(aVec3));
       }
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       return Standard_False;
     }
@@ -455,7 +455,7 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
 
     myMaxDistance = sqrt(Abs(myMaxDistance));
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     myErrorStatus = 3;
   }
 }
@@ -676,7 +676,7 @@ Standard_Integer FillSubIntervals(const Handle(Geom_Curve)& theCurve3d,
       theNbParticles = Max(theNbParticles, aBS2DCurv->Degree());
     }
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
 #ifdef OCCT_DEBUG
     cout << "ERROR! BRepLib_CheckCurveOnSurface.cxx, "
@@ -801,7 +801,7 @@ Standard_Boolean MinComputing (
       }
     }
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
 #ifdef OCCT_DEBUG
     cout << "BRepLib_CheckCurveOnSurface.cxx: Exception in MinComputing()!" << endl;
index 5e6ad44..544f5f4 100644 (file)
@@ -1129,7 +1129,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer
     }
   }
 
-  catch (Standard_Failure )
+  catch (Standard_Failure const&)
   {
     di << " Standard Failure  \n";
   }
@@ -1177,7 +1177,7 @@ static Standard_Integer EllipsUniformAbscissa (Draw_Interpretor& di, Standard_In
     DBRep::Set("Ellipse",edge_curve);
   }
   
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     di << " Standard Failure  \n";     
   }
@@ -1206,7 +1206,7 @@ static Standard_Integer EllipsUniformAbscissa (Draw_Interpretor& di, Standard_In
     }
   }
 
-  catch (Standard_Failure )
+  catch (Standard_Failure const&)
   {
     di << " Standard Failure  \n";
   }
index 611bb30..c6a5b0f 100644 (file)
@@ -3325,7 +3325,7 @@ void IFSelect_WorkSession::DumpModel
        if (level == 3) C = CT.CheckList();
        else    C = CT.CompleteCheckList();
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
        Handle(Message_Messenger) sout = Message::DefaultMessenger();
        sout<<"    ****    Interruption DumpModel (Check) par Exception    ****\n";
        S<<"  ** **  Exception Raised during Check !  ** **\n";
index c51dd98..ed6811d 100644 (file)
@@ -126,7 +126,7 @@ Standard_Integer IGESFile_Read
       OCC_CATCH_SIGNALS
       IGESFile_ReadHeader(IR);
     }    // fin essai 1 (global)
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       // Sending of message : Internal error during the header reading 
       Message_Msg Msg11 = Message_Msg("XSTEP_11");
       IGESFile_Check (1,Msg11);
@@ -140,7 +140,7 @@ Standard_Integer IGESFile_Read
 
   // Sending of message : Loaded data  
     }    // fin essai 2 (entites)
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       // Sending of message : Internal error during the content reading 
       if (recupnp == 0) {
        Message_Msg Msg13 = Message_Msg("XSTEP_13");
index 8cc1bb5..822ab6c 100644 (file)
@@ -191,7 +191,7 @@ static  Handle(IGESData_FileProtocol) IGESProto;
     OCC_CATCH_SIGNALS
     dump.Dump(igesent,S,level,(level-1)/3);
   }
-  catch (Standard_Failure) {
+  catch (Standard_Failure const&) {
     S << " **  Dump Interrupt **" << endl;
   }
 }
index 8e791ca..620cb00 100644 (file)
@@ -114,7 +114,7 @@ static Standard_Boolean  EncodeRegul (const TopoDS_Shape& sh)
     OCC_CATCH_SIGNALS
     BRepLib::EncodeRegularity (sh,tolang);
   }
-  catch(Standard_Failure) {
+  catch(Standard_Failure const&) {
     return Standard_False;
   }
   return Standard_True;
@@ -191,7 +191,7 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
         OCC_CATCH_SIGNALS
        shape = CAS.TransferGeometry(ent);
       }
-      catch(Standard_Failure) {
+      catch(Standard_Failure const&) {
        shape.Nullify();
       }
     }
index 877e901..d8ad1c4 100644 (file)
@@ -1121,7 +1121,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferBSplineCurve
         BSplineRes->Segment(Udeb, Ufin);
       res = BSplineRes;
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       Handle(Geom_TrimmedCurve) gtc = new Geom_TrimmedCurve(BSplineRes2,Udeb,Ufin);
       res = gtc;
     }
index 28d115c..7b56710 100644 (file)
@@ -293,7 +293,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
       OCC_CATCH_SIGNALS
         res = TransferCurveAndSurface(start);
     }
-    catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
       Message_Msg msg1015("IGES_1015");
       SendFail(start, msg1015);
     }
@@ -325,7 +325,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
          OCC_CATCH_SIGNALS
          res = TransferGeometry(stsub);
        }
-       catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
          res.Nullify();
           Message_Msg msg1015("IGES_1015");
          SendFail( st408, msg1015);
@@ -368,7 +368,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
          OCC_CATCH_SIGNALS
          item = TransferGeometry(st308->AssociatedEntity(i));
        }
-       catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
          item.Nullify();
          Message_Msg msg1015("IGES_1015");
          SendFail( st308->AssociatedEntity(i), msg1015);
@@ -422,7 +422,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
          OCC_CATCH_SIGNALS
          item = TransferGeometry(st402f1->Entity(i));
        }
-       catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
          item.Nullify();
          Message_Msg msg1015("IGES_1015");
          SendFail(st402f1->Entity(i),msg1015);
@@ -485,7 +485,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
          OCC_CATCH_SIGNALS
          item = TransferGeometry(st402f7->Entity(i));
        }
-       catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
          item.Nullify();
          Message_Msg msg1015("IGES_1015");
          SendFail(st402f7->Entity(i),msg1015);
index 755669c..34d8f0d 100644 (file)
@@ -296,7 +296,7 @@ static Standard_Boolean  EncodeRegul (const TopoDS_Shape& sh)
     OCC_CATCH_SIGNALS
     BRepLib::EncodeRegularity (sh,tolang);
   }
-  catch(Standard_Failure) {
+  catch(Standard_Failure const&) {
     return Standard_False;
   }
   return Standard_True;
@@ -431,7 +431,7 @@ void  IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible)
         TP.Transfer(ent);
         shape = TransferBRep::ShapeResult (theProc,ent);
       } 
-      catch(Standard_Failure) {
+      catch(Standard_Failure const&) {
         Message_Msg msg1005("IGES_1005");
         TF->Send (msg1005, Message_Info);
         continue;
@@ -540,7 +540,7 @@ Standard_Boolean  IGESToBRep_Reader::Transfer(const Standard_Integer num)
       OCC_CATCH_SIGNALS
       shape = CAS.TransferGeometry (ent);
     } 
-    catch(Standard_Failure) {
+    catch(Standard_Failure const&) {
       Message_Msg msg1015("IGES_1015");
       TF->Send (msg1015, Message_Info);
       exceptionRaised = Standard_True;
index c7c2227..eee599c 100644 (file)
@@ -44,10 +44,10 @@ inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS2() const {
 }
 
 inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface1() const { 
-  return  (*((const ThePSurface * const)(surf1)));
+  return *((const ThePSurface* )surf1);
 }
 
 inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface2() const {
-  return  (*((const ThePSurface * const)(surf2)));
+  return *((const ThePSurface* )surf2);
 }
 
index 7cda071..31aade4 100644 (file)
@@ -68,7 +68,7 @@ public:
 
       (aP1.XYZ()-aP2.XYZ()).Coord(theF(anIndF), theF(anIndF+1), theF(anIndF+2));
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       return Standard_False;
     }
@@ -106,7 +106,7 @@ public:
       aD2[mySeamCoordInd].Reversed().Coord(theD(anIndRD, anIndCD+2),
                                 theD(anIndRD+1, anIndCD+2), theD(anIndRD+2, anIndCD+2));
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       return Standard_False;
     }
index 6f7eb5b..a611e40 100644 (file)
@@ -332,7 +332,7 @@ void Interface_FileReaderTool::LoadModel
       OCC_CATCH_SIGNALS
       BeginRead(amodel);  // selon la norme
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       // Sendinf of message : Internal error during the header reading
       Message_Msg Msg11("XSTEP_11");
       TF->Send (Msg11, Message_Info); 
@@ -481,7 +481,7 @@ void Interface_FileReaderTool::LoadModel
       OCC_CATCH_SIGNALS
       EndRead(amodel);  // selon la norme
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       // Sendinf of message : Internal error during the header reading
       Message_Msg Msg11("XSTEP_11");
       TF->Send (Msg11, Message_Info); 
index 6751e28..67b0bf6 100644 (file)
@@ -149,8 +149,7 @@ char * LDOM_CharReference::Encode (const char* theSrc, Standard_Integer& theLen,
   Standard_Integer aCount = 0;
   //    Analyse if there is a non-standard character in the string
   for(;;) {
-    const unsigned int iSrc =
-      (const unsigned int) * (const unsigned char *) ptrSrc;
+    const unsigned int iSrc = (unsigned int ) *(const unsigned char* )ptrSrc;
     if (iSrc == 0) {
       endSrc = ptrSrc;
       break;
@@ -167,8 +166,7 @@ char * LDOM_CharReference::Encode (const char* theSrc, Standard_Integer& theLen,
     char * ptrDest = new char [(endSrc - theSrc) + aCount * 5 + 1];
     aDest = ptrDest;
     for (ptrSrc = theSrc; ptrSrc < endSrc; ptrSrc++) {
-      const unsigned int iSrc =
-        (const unsigned int) * (const unsigned char *) ptrSrc;
+      const unsigned int iSrc = (unsigned int ) *(const unsigned char* )ptrSrc;
       const int aCode = myTab[iSrc];
       if (aCode == NORMAL_C)                    // normal (regular) character
         * ptrDest++ = * ptrSrc;
index 919ea33..5492166 100644 (file)
@@ -164,7 +164,7 @@ Standard_Integer LDOM_MemManager::HashTable::Hash (const char * aString,
   unsigned int aCRC = 0;
   const unsigned char * aPtr = (const unsigned char *) aString;
   for (Standard_Integer i = aLen; i > 0; i--) {
-    const unsigned int  bTmp = aCRC ^ (const unsigned int) (* aPtr++);
+    const unsigned int  bTmp = aCRC ^ (unsigned int) (* aPtr++);
     aCRC = ((aCRC >> 8) ^ wCRC16a[bTmp & 0x0F]) ^ wCRC16b[(bTmp >> 4) & 0x0F];
   }
   return Standard_Integer (aCRC & HASH_MASK /* myMask */);
index 401dfc7..2380632 100644 (file)
@@ -210,8 +210,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord (Standard_IStream& theIStr
           }       // otherwise ERROR
         }     // end of switch
         myError = "Unknown XML object: ";
-        myError += TCollection_AsciiString ((const Standard_CString)myPtr,
-                                            XML_MIN_BUFFER);
+        myError += TCollection_AsciiString (myPtr, XML_MIN_BUFFER);
         return XML_UNKNOWN;
       case '\0':
         if (myEOF == Standard_True) continue;
index 80b896b..35c2935 100644 (file)
@@ -587,7 +587,7 @@ Standard_Boolean LocOpe_SplitShape::Add(const TopoDS_Wire& W,
       if(!AddClosedWire(W,F))
         return Standard_False;
     }
-  } catch (Standard_Failure ) {
+  } catch (Standard_Failure const&) {
 #ifdef OCCT_DEBUG
     cout << "Warning: SpliShape internal problem detected, some faces may be lost. Check input edges/wires" <<endl;
 #endif
index 04ea7bf..e8304bf 100644 (file)
@@ -146,7 +146,7 @@ TCollection_ExtendedString PCDM_ReadWriter::FileFormat
       theFormat = td.Types()->Value(1);
     }
   }
-  catch (Standard_Failure) {}
+  catch (Standard_Failure const&) {}
 
   
   if(theFileIsOpen)theFileDriver->Close();
index 18b9bb1..cb23cb2 100644 (file)
@@ -251,7 +251,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(const TCollection_Exten
     for ( i =1; i<=  refUserInfo.Length() ; i++) {
       if(refUserInfo(i).Search(REFERENCE_COUNTER) != -1) {
        try { OCC_CATCH_SIGNALS theReferencesCounter=refUserInfo(i).Token(" ",2).IntegerValue();}
-       catch (Standard_Failure) { 
+    catch (Standard_Failure const&) {
 //       cout << "warning: could not read the reference counter in " << aFileName << endl;
          TCollection_ExtendedString aMsg("Warning: ");
          aMsg = aMsg.Cat("could not read the reference counter in ").Cat(aFileName).Cat("\0");
@@ -262,7 +262,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(const TCollection_Exten
     }
     
   }
-  catch (Standard_Failure) {}
+  catch (Standard_Failure const&) {}
 
   if(theFileIsOpen)  theFileDriver->Close();
 
@@ -400,7 +400,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(const TCollection_Extend
     for ( i =1; i<=  refUserInfo.Length() ; i++) {
       if(refUserInfo(i).Search(MODIFICATION_COUNTER) != -1) {
        try { OCC_CATCH_SIGNALS theVersion=refUserInfo(i).Token(" ",2).IntegerValue();}
-       catch (Standard_Failure) { 
+    catch (Standard_Failure const&) {
 //       cout << "warning: could not read the version in " << aFileName << endl;
          TCollection_ExtendedString aMsg("Warning: ");
          aMsg = aMsg.Cat("could not read the version in ").Cat(aFileName).Cat("\0");
@@ -412,7 +412,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(const TCollection_Extend
     }
   }
 
-  catch (Standard_Failure) {}
+  catch (Standard_Failure const&) {}
 
   if(theFileIsOpen) theFileDriver->Close();
   delete theFileDriver;
index 45c84fd..b74bb22 100644 (file)
@@ -191,7 +191,7 @@ static Standard_Integer isPeriodic(Draw_Interpretor& di, Standard_Integer argc,
       if(aRevolSurf->IsUPeriodic()) {di << "Surface is u-periodic \n";} else {di << "Surface is not u-periodic \n";}
       if(aRevolSurf->IsVPeriodic()) {di << "Surface is v-periodic \n";} else {di << "Surface is not v-periodic \n";}
     }
-  catch (Standard_Failure) {di << "isperiodic Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "isperiodic Exception \n" ;return 0;}
 
   return 0;
 }
@@ -261,7 +261,7 @@ static Standard_Integer OCC486(Draw_Interpretor& di, Standard_Integer argc, cons
       }
       else return 1;
     }
-  catch (Standard_Failure) {di << "OCC486 Exception \n" ;return 1;}
+  catch (Standard_Failure const&) {di << "OCC486 Exception \n" ;return 1;}
 }
 
 #include <GC_MakeArcOfCircle.hxx>
@@ -384,7 +384,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con
          DBRep::Set(argv[1], slabShape);
         }
     }
-  catch ( Standard_Failure ) //--------------------> STEP:2
+  catch ( Standard_Failure const& ) //--------------------> STEP:2
     {
       di << " Error in Draft Slab \n";
       return 1;
@@ -485,7 +485,7 @@ static Standard_Integer OCC822_1 (Draw_Interpretor& di, Standard_Integer argc, c
 
     performTriangulation(theRes, di);
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -540,7 +540,7 @@ static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, co
 
     performTriangulation(fuse, di);
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -595,7 +595,7 @@ static Standard_Integer OCC823 (Draw_Interpretor& di,Standard_Integer argc, cons
 
     performTriangulation(fuse, di);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -645,7 +645,7 @@ static Standard_Integer OCC824 (Draw_Interpretor& di,Standard_Integer argc, cons
 
     performTriangulation(fuse, di);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -732,7 +732,7 @@ static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, cons
     di << "Trianglating Faces of CUT 2 .....\n";
     performTriangulation(cut2, di);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -803,7 +803,7 @@ static Standard_Integer OCC826 (Draw_Interpretor& di,Standard_Integer argc, cons
     di << "Fuse Created !   Triangulating !\n";
     performTriangulation(fuse, di);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -882,7 +882,7 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons
 
     performTriangulation(fuse2, di);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "*********************************************************\n";
     di << "*****                                              ******\n";
@@ -921,7 +921,7 @@ int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape,
         status = 1;
       }
     }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
     {
       status = 1;
     }
@@ -1026,7 +1026,7 @@ static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, cons
 //       cout << "Blending Successfully Done !   Now Triangulating ..." << endl;
 //       performTriangulation(aShape);
     }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
     {
       di << " Error in Draft Slab \n";
       return 1;
index cbb74db..3b44114 100644 (file)
@@ -993,7 +993,7 @@ static Standard_Integer OCC363 (Draw_Interpretor& di, Standard_Integer argc, con
       if ( ! seq.Value(i).FindAttribute ( TPrsStd_AISPresentation::GetID(), prs ) )
         prs = TPrsStd_AISPresentation::Set(seq.Value(i),XCAFPrs_Driver::GetID());
   }
-  catch(Standard_Failure) { di << "FAULTY OCC363 : Exception during reading document.\n";return 0;}
+  catch(Standard_Failure const&) { di << "FAULTY OCC363 : Exception during reading document.\n";return 0;}
 
   di << "OCC363 OK\n";
   return 0;
@@ -1127,7 +1127,7 @@ static Standard_Integer OCC377 (Draw_Interpretor& di, Standard_Integer argc, con
       else {di << "OCC377 FAULTY\n"; return 0;}
     }
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     di << "OCC377 Exception";
   }
@@ -1183,7 +1183,7 @@ static Standard_Integer OCC22 (Draw_Interpretor& di, Standard_Integer argc, cons
     // 4.3. Create result Draw shape
     DBRep::Set(argv[1], aResultShape);
   }
-  catch (Standard_Failure) {di << "OCC22 Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "OCC22 Exception \n" ;return 0;}
 
   return 0;
 }
@@ -1238,7 +1238,7 @@ static Standard_Integer OCC24 (Draw_Interpretor& di, Standard_Integer argc, cons
     DBRep::Set(argv[1], aResultShape);
 
   }
-  catch (Standard_Failure) {di << "OCC24 Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "OCC24 Exception \n" ;return 0;}
 
   return 0;
 }
@@ -1267,7 +1267,7 @@ static Standard_Integer OCC369(Draw_Interpretor& di, Standard_Integer argc, cons
     BRepMesh_IncrementalMesh aMesh(aShape, aMeshParams);
 
   }
-  catch (Standard_Failure) {di << "OCC369 Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "OCC369 Exception \n" ;return 0;}
 
   di << "OCC369 OK \n";
   return 0;
@@ -2234,9 +2234,9 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       Succes = Standard_False;
     }
 #if defined(SOLARIS) || defined(_WIN32)
-    catch(Standard_DivideByZero)
+    catch(Standard_DivideByZero const&)
 #else
-    catch(Standard_NumericError)
+    catch(Standard_NumericError const&)
 #endif
     {
       di << "Caught, OK\n";
@@ -2266,11 +2266,11 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       di << "Error: 4.0 / 0.0 = " << res << " - no exception is raised!\n";
       Succes = Standard_False;
     }
-    catch(Standard_DivideByZero) // Solaris, Windows w/o SSE2
+    catch(Standard_DivideByZero const&) // Solaris, Windows w/o SSE2
     {
       di << "Caught, OK\n";
     }
-    catch(Standard_NumericError) // Linux, Windows with SSE2
+    catch(Standard_NumericError const&) // Linux, Windows with SSE2
     {
       di << "Caught, OK\n";
     }
@@ -2296,7 +2296,7 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       //++++ Succes = Standard_False;
       di << "Not caught: " << i << " + 1 = " << res << ", still OK\n";
     }
-    catch(Standard_Overflow) {
+    catch(Standard_Overflow const&) {
       di << "Caught, OK\n";
     }
     catch(Standard_Failure const& anException) {
@@ -2323,11 +2323,11 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       di << "Error: " << r << "*" << r << " = " << res << " - no exception is raised!\n";
       Succes = Standard_False;
     }
-    catch(Standard_Overflow) // Solaris, Windows w/o SSE2
+    catch(Standard_Overflow const&) // Solaris, Windows w/o SSE2
     {
       di << "Caught, OK\n";
     }
-    catch(Standard_NumericError) // Linux, Windows with SSE2
+    catch(Standard_NumericError const&) // Linux, Windows with SSE2
     {
       di << "Caught, OK\n";
     }
@@ -2354,12 +2354,12 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       //++++ Succes = Standard_False;
       di << "Not caught: " << r << "*" << r << " = " << res << ", still OK\n";
     }
-    catch(Standard_Underflow) // could be on Solaris, Windows w/o SSE2
+    catch(Standard_Underflow const&) // could be on Solaris, Windows w/o SSE2
     {
       di << "Exception caught, KO\n";
       Succes = Standard_False;
     }
-    catch(Standard_NumericError) // could be on Linux, Windows with SSE2
+    catch(Standard_NumericError const&) // could be on Linux, Windows with SSE2
     {
       di << "Exception caught, KO\n";
       Succes = Standard_False;
@@ -2385,7 +2385,7 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       di << "Error: swrt(-1) = " << res << " - no exception is raised!\n";
       Succes = Standard_False;
     }
-    catch(Standard_NumericError) {
+    catch(Standard_NumericError const&) {
       di << "Caught, OK\n";
     }
     catch(Standard_Failure const& anException) {
@@ -2410,9 +2410,9 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       Succes = Standard_False;
     }
 #ifdef _WIN32
-    catch(OSD_Exception_ACCESS_VIOLATION)
+    catch(OSD_Exception_ACCESS_VIOLATION const&)
 #else
-    catch(OSD_SIGSEGV)
+    catch(OSD_SIGSEGV const&)
 #endif
     {
       di << "Caught, OK\n";
@@ -2437,7 +2437,7 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
       di << "Error - no exception is raised!\n";
       Succes = Standard_False;
     }
-    catch(OSD_Exception_STACK_OVERFLOW) {
+    catch(OSD_Exception_STACK_OVERFLOW const&) {
       di << "Caught, OK\n";
     }
     catch(Standard_Failure const& anException) {
@@ -2508,7 +2508,7 @@ static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, co
        writer.Write(aFilePath.ToCString());
     }
   }
-  catch(OSD_Exception_STACK_OVERFLOW) {
+  catch(OSD_Exception_STACK_OVERFLOW const&) {
     di << "Failed : STACK OVERFLOW\n\n";
   }
   catch (Standard_Failure const& anException) {
@@ -3055,7 +3055,7 @@ static Standard_Integer OCC15489 (Draw_Interpretor& di, Standard_Integer argc, c
       gp_Pnt2d anOrigin = aLin2d.Location();
       di << "X_0 = " << anOrigin.X() << "   Y_0 = " << anOrigin.Y() << "\n" ;
     }
-  catch(Standard_ConstructionError)
+  catch(Standard_ConstructionError const&)
     {
       di << argv[0] << " Exception: Sqrt(A*A + B*B) <= Resolution from gp\n";
     }
index 9dfa0c8..3cb5c23 100644 (file)
@@ -365,7 +365,7 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc,
     OCC_CATCH_SIGNALS
     di << " yes\n";
   }
-  catch (Standard_TypeMismatch) {
+  catch (Standard_TypeMismatch const&) {
     di << " no\n";
   }
 
@@ -657,7 +657,7 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con
     B.Add(wallSolid,TubeShell);
     di << " yes\n";
   }
-  catch (Standard_TypeMismatch) {
+  catch (Standard_TypeMismatch const&) {
     di << "Can't convert to shell...\n";
     TopExp_Explorer getSol;
     getSol.Init(SewIt.SewedShape(), TopAbs_SOLID);
index ee52ba5..5409cdc 100644 (file)
@@ -424,7 +424,7 @@ static Standard_Integer OCC132 (Draw_Interpretor& di, Standard_Integer argc, con
       OCC_CATCH_SIGNALS
       OSD_Path Path (argv[1], SysType1);
     }
-    catch (Standard_ProgramError) {
+    catch (Standard_ProgramError const&) {
       di << "1\n";
       return 0;
     }
@@ -435,7 +435,7 @@ static Standard_Integer OCC132 (Draw_Interpretor& di, Standard_Integer argc, con
       OCC_CATCH_SIGNALS
       OSD_Path Path (argv[1], SysType2);
     }
-    catch (Standard_ProgramError) {
+    catch (Standard_ProgramError const&) {
       di << "2\n";
       return 0;
     }
index 86ed992..ecab6d4 100644 (file)
@@ -623,7 +623,7 @@ static Standard_Integer OCC570 (Draw_Interpretor& di, Standard_Integer argc,cons
 
       DBRep::Set(argv[1],aFinalShape);
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       di << argv[0] << ": Exception in fillet\n";
       return 2;
@@ -788,7 +788,7 @@ static Standard_Integer OCC606 ( Draw_Interpretor& di, Standard_Integer n, const
         DBRep::Set(a[1],bsp_face1);
       }
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       di<<"ERROR: Exception in GeomFill_NSections\n";
     }
index f2ab1ee..22827e8 100644 (file)
@@ -1937,7 +1937,7 @@ static Standard_Integer OCC24834 (Draw_Interpretor& di, Standard_Integer n, cons
       aList.Append(MyStubObject(Standard::Allocate(aLargeBlockSize)));
     }
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "caught out of memory for large blocks: OK\n";
   }
@@ -1954,7 +1954,7 @@ static Standard_Integer OCC24834 (Draw_Interpretor& di, Standard_Integer n, cons
       aList.Append(MyStubObject(Standard::Allocate(aSmallBlockSize)));
     }
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     di << "caught out of memory for small blocks: OK\n";
   }
@@ -3260,7 +3260,7 @@ static Standard_Integer OCC26139 (Draw_Interpretor& theDI,
 #ifdef _WIN32
 #define EXCEPTION ...
 #else
-#define EXCEPTION Standard_Failure
+#define EXCEPTION Standard_Failure const&
 #endif
 
 static ShapeExtend_Status getStatusGap(const Handle(ShapeFix_Wire)&   theFix,
@@ -4276,7 +4276,7 @@ static Standard_Integer OCC26313(Draw_Interpretor& di,Standard_Integer n,const c
     {
       DBRep::Set(a[1], gtrf.ModifiedShape(aSrcShape));
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       di << "Error: Exception is thrown\n";
     }
index e17c159..815cbb9 100644 (file)
@@ -122,7 +122,7 @@ static Standard_Integer OCC527(Draw_Interpretor& di, Standard_Integer argc, cons
       }
     }
   }
-  catch (Standard_Failure) {di << "OCC527 Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "OCC527 Exception \n" ;return 0;}
   
   return 0;
 }
index 14e04bb..6d92a0e 100644 (file)
@@ -1321,7 +1321,7 @@ namespace AllocTest
         for (;;)
           aList.Append(Standard::Allocate(aBlockSizes[i]));
       }
-      catch (Standard_Failure)
+      catch (Standard_Failure const&)
       {
         aStatus |= OUMCatchOK;
       }
@@ -2031,7 +2031,7 @@ static Standard_Integer OCC27357(Draw_Interpretor& theDI,
         Geom2dAdaptor_Curve(normalLine),1e-9,g1,g1,g3);
       aDuumyList.Append(aCircleBuilder.NbSolutions());
     }
-    catch(Standard_Failure)
+    catch(Standard_Failure const&)
     {
       theDI << "Exception was caught\n";
     }
@@ -2084,7 +2084,7 @@ static Standard_Integer OCC26270(Draw_Interpretor& theDI,
         DBRep::Set(theArgVal[2], bsp_face1);
       }
     }
-    catch (Standard_Failure)
+    catch (Standard_Failure const&)
     {
       theDI << "ERROR: Exception in GeomFill_NSections\n";
     }
index 0420481..00064ae 100644 (file)
@@ -106,7 +106,7 @@ static Standard_Integer OCC5696 (Draw_Interpretor& di, Standard_Integer argc, co
     di << "par_edge = " << par_edge << "\n";
   }
 
-  catch (Standard_Failure) {di << "OCC5696 Exception \n" ;return 0;}
+  catch (Standard_Failure const&) {di << "OCC5696 Exception \n" ;return 0;}
 
   return 0;
 }
index 20bf3c6..8090c29 100644 (file)
@@ -262,7 +262,7 @@ Standard_Boolean Resource_Manager::Save() const
         OCC_CATCH_SIGNALS
         Dir.Build(OSD_Protection(OSD_RX, OSD_RWXD, OSD_RX, OSD_RX));
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
         aStatus = Standard_False;
       }
     }
@@ -291,7 +291,7 @@ Standard_Boolean Resource_Manager::Save() const
       OCC_CATCH_SIGNALS
       File.Build(OSD_ReadWrite, theProt);
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       aStatus = Standard_False;
     }
   }
index 6464874..8fb1496 100644 (file)
@@ -835,7 +835,7 @@ Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_
     }
 
     // add extern ref
-    const Standard_CString format = (const Standard_CString) ( schema == 3 ? "STEP AP203" : "STEP AP214" );
+    const char* format = (schema == 3 ? "STEP AP203" : "STEP AP214");
     // try to get PD from SDR
     StepRepr_RepresentedDefinition RD = SDR->Definition();
     Handle(StepRepr_PropertyDefinition) aPropDef = RD.PropertyDefinition();
index 4c9dc89..11fece1 100644 (file)
@@ -1234,7 +1234,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
     found = Standard_True;
   }
 }
-  catch(Standard_Failure) {
+  catch(Standard_Failure const&) {
     TP->AddFail(start,"Exeption is raised. Entity was not translated.");
     TP->Bind(start, shbinder);
     return shbinder;
@@ -1395,7 +1395,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
     TP->Bind(fs, sb);
     return sb; // TP->Find (start);
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     TP->AddFail(fs,"Exeption is raised. Entity was not translated.");
     sb.Nullify();
index 9379b89..800d2f4 100644 (file)
@@ -924,7 +924,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
        angle1 = V11.Angle(V12);
        angle2 = V21.Angle(V22);
       }
-      catch (Standard_Failure)
+      catch (Standard_Failure const&)
        {
 #ifdef OCCT_DEBUG
           cout << "Couldn't compute angle between derivative vectors"  <<endl;
index d97d1f4..3c622e7 100644 (file)
@@ -838,7 +838,7 @@ static void AppendControlPoles (TColgp_SequenceOfPnt& seq,
         AppendControlPoles(seq,bslp);
         done = Standard_True;
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
       }
     }
     else if ( aBaseCrv->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
@@ -850,7 +850,7 @@ static void AppendControlPoles (TColgp_SequenceOfPnt& seq,
         AppendControlPoles(seq,bz);
         done = Standard_True;
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
       }
     }
     if (!done) {
index 808a90b..0d4ab45 100644 (file)
@@ -108,7 +108,7 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S,
         OCC_CATCH_SIGNALS
         result = MD.ModifiedShape( current );
       }
-      catch (Standard_NoSuchObject)
+      catch (Standard_NoSuchObject const&)
       {
         // the sub shape isn't in the map
         result.Nullify();
index da1ee39..319d2bd 100644 (file)
@@ -174,7 +174,7 @@ Standard_Boolean ShapeCustom_Curve2d::SimplifyBSpline2d (Handle(Geom2d_BSplineCu
                                  aMult-1,
                                  theTolerance);
         }
-        catch(Standard_Failure)
+        catch(Standard_Failure const&)
         {
         }
       }
index 945590b..9f950db 100644 (file)
@@ -282,7 +282,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
              Standard_Boolean sewing_ok = Standard_True;
              {
              try { OCC_CATCH_SIGNALS theSewer.Perform(); }
-             catch(Standard_Failure) { sewing_ok = Standard_False; }
+          catch(Standard_Failure const&) { sewing_ok = Standard_False; }
              }
              if ( sewing_ok )
                if (theSewer.SewedShape().IsNull()) sewing_ok = Standard_False;
index 4bb06b1..8158033 100644 (file)
@@ -2913,7 +2913,7 @@ static Standard_Boolean TryBendingPCurve (const TopoDS_Edge &E, const TopoDS_Fac
 
     if ( ! TryNewPCurve ( E, face, c2d, first, last, tol ) ) return Standard_False;
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure const& ) {
 #ifdef OCCT_DEBUG
     cout << "Warning: ShapeFix_Wire::FixLacking: Exception in Geom2d_BSplineCurve::Segment()" << endl;
 #endif
index 5c00a23..9c51d4d 100644 (file)
@@ -598,7 +598,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
              done1 = done2 = Standard_True;
            }
          }
-         catch ( Standard_Failure ) 
+      catch ( Standard_Failure const& )
           {
           }
        }
index b831f74..ffe0864 100644 (file)
@@ -161,7 +161,7 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
            OCC_CATCH_SIGNALS
            corrected = MyBSpline->RemoveKnot(iknot, newMultiplicity, myTolerance);
          }
-         catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
            corrected = Standard_False;
          }
        }
index 588c7be..3494d48 100644 (file)
@@ -162,7 +162,7 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
            OCC_CATCH_SIGNALS
            corrected = MyBSpline->RemoveKnot(iknot, newMultiplicity, myTolerance);
          }
-         catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
            corrected = Standard_False;
          }
        }
index f27230f..37482ad 100644 (file)
@@ -317,7 +317,7 @@ static Standard_Boolean IsSameDomain(const TopoDS_Face& aFace,
 
       return anIIInt.TangentFaces();
     }
-    catch (Standard_Failure) {
+    catch (Standard_Failure const&) {
       return Standard_False;
     }
   }
index 19530a1..9ef6dc7 100644 (file)
@@ -184,7 +184,7 @@ Handle(StdObjMgt_Persistent) StdLDrivers_DocumentRetrievalDriver::read (
       aFileDriver->ReadReferenceType (aRef, aType);
       anError = Storage_VSOk;
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       anError = Storage_VSTypeMismatch;
     }
@@ -208,9 +208,9 @@ Handle(StdObjMgt_Persistent) StdLDrivers_DocumentRetrievalDriver::read (
       aReadData.ReadPersistentObject (i);
       anError = Storage_VSOk;
     }
-    catch (Storage_StreamTypeMismatchError) { anError = Storage_VSTypeMismatch; }
-    catch (Storage_StreamFormatError      ) { anError = Storage_VSFormatError;  }
-    catch (Storage_StreamReadError        ) { anError = Storage_VSFormatError;  }
+    catch (Storage_StreamTypeMismatchError const&) { anError = Storage_VSTypeMismatch; }
+    catch (Storage_StreamFormatError const&      ) { anError = Storage_VSFormatError;  }
+    catch (Storage_StreamReadError const&        ) { anError = Storage_VSFormatError;  }
 
     raiseOnStorageError (anError);
   }
index 6a5febf..edba836 100644 (file)
@@ -560,7 +560,7 @@ void StdPrs_Isolines::addOnSurface (const Handle(BRepAdaptor_HSurface)& theSurfa
       }
     }
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     // ...
   }
index 5dc8b6e..880e704 100644 (file)
@@ -447,7 +447,7 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
   try {
     OCC_CATCH_SIGNALS
     cu3d.Initialize (anEdge);
-  } catch (Standard_NullObject) {
+  } catch (Standard_NullObject const&) {
     return;
   }
 
@@ -626,7 +626,7 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
       OCC_CATCH_SIGNALS
       cu3d.Initialize (aWireExplorer.Current());
     }
-    catch (Standard_NullObject)
+    catch (Standard_NullObject const&)
     {
       continue;
     }
index 6799a24..fe0bda9 100644 (file)
@@ -66,7 +66,7 @@ Storage_Error StdStorage::Read(const TCollection_AsciiString& theFileName,
     OCC_CATCH_SIGNALS
     PCDM_ReadWriter::Open(*aDriver, theFileName, Storage_VSRead);
   }
-  catch (Standard_Failure)
+  catch (Standard_Failure const&)
   {
     return Storage_VSOpenError;
   }
@@ -134,7 +134,7 @@ Storage_Error StdStorage::Read(Storage_BaseDriver&      theDriver,
       theDriver.ReadReferenceType(aRef, aType);
       anError = Storage_VSOk;
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       anError = Storage_VSTypeMismatch;
     }
@@ -162,9 +162,9 @@ Storage_Error StdStorage::Read(Storage_BaseDriver&      theDriver,
       aReadData.ReadPersistentObject(i);
       anError = Storage_VSOk;
     }
-    catch (Storage_StreamTypeMismatchError) { anError = Storage_VSTypeMismatch; }
-    catch (Storage_StreamFormatError) { anError = Storage_VSFormatError; }
-    catch (Storage_StreamReadError) { anError = Storage_VSFormatError; }
+    catch (Storage_StreamTypeMismatchError const&) { anError = Storage_VSTypeMismatch; }
+    catch (Storage_StreamFormatError const&) { anError = Storage_VSFormatError; }
+    catch (Storage_StreamReadError const&) { anError = Storage_VSFormatError; }
 
     if (anError != Storage_VSOk)
       return anError;
@@ -311,7 +311,7 @@ Storage_Error StdStorage::Write(Storage_BaseDriver&            theDriver,
     if (anError != Storage_VSOk)
       return anError;
   }
-  catch (Storage_StreamWriteError) {
+  catch (Storage_StreamWriteError const&) {
     return Storage_VSWriteError;
   }
 
index 54ccaa5..38fb245 100644 (file)
@@ -58,13 +58,13 @@ Standard_Boolean StdStorage_HeaderData::Read(Storage_BaseDriver& theDriver)
                         myDataType,
                         myUserInfo);
   }
-  catch (Storage_StreamTypeMismatchError)
+  catch (Storage_StreamTypeMismatchError const&)
   {
     myErrorStatus = Storage_VSTypeMismatch;
     myErrorStatusExt = "ReadInfo";
     return Standard_False;
   }
-  catch (Storage_StreamExtCharParityError)
+  catch (Storage_StreamExtCharParityError const&)
   {
     myErrorStatus = Storage_VSExtCharParityError;
     myErrorStatusExt = "ReadInfo";
@@ -91,13 +91,13 @@ Standard_Boolean StdStorage_HeaderData::Read(Storage_BaseDriver& theDriver)
     OCC_CATCH_SIGNALS
     theDriver.ReadComment(myComments);
   }
-  catch (Storage_StreamTypeMismatchError)
+  catch (Storage_StreamTypeMismatchError const&)
   {
     myErrorStatus = Storage_VSTypeMismatch;
     myErrorStatusExt = "ReadComment";
     return Standard_False;
   }
-  catch (Storage_StreamExtCharParityError)
+  catch (Storage_StreamExtCharParityError const&)
   {
     myErrorStatus = Storage_VSExtCharParityError;
     myErrorStatusExt = "ReadComment";
@@ -146,13 +146,13 @@ Standard_Boolean StdStorage_HeaderData::Write(Storage_BaseDriver& theDriver)
                         myDataType,
                         myUserInfo);
   }
-  catch (Storage_StreamTypeMismatchError)
+  catch (Storage_StreamTypeMismatchError const&)
   {
     myErrorStatus = Storage_VSTypeMismatch;
     myErrorStatusExt = "WriteInfo";
     return Standard_False;
   }
-  catch (Storage_StreamExtCharParityError)
+  catch (Storage_StreamExtCharParityError const&)
   {
     myErrorStatus = Storage_VSExtCharParityError;
     myErrorStatusExt = "WriteInfo";
@@ -179,13 +179,13 @@ Standard_Boolean StdStorage_HeaderData::Write(Storage_BaseDriver& theDriver)
     OCC_CATCH_SIGNALS
     theDriver.WriteComment(myComments);
   }
-  catch (Storage_StreamTypeMismatchError)
+  catch (Storage_StreamTypeMismatchError const&)
   {
     myErrorStatus = Storage_VSTypeMismatch;
     myErrorStatusExt = "WriteComment";
     return Standard_False;
   }
-  catch (Storage_StreamExtCharParityError)
+  catch (Storage_StreamExtCharParityError const&)
   {
     myErrorStatus = Storage_VSExtCharParityError;
     myErrorStatusExt = "WriteComment";
index 100cb18..0747a38 100644 (file)
@@ -58,7 +58,7 @@ Standard_Boolean StdStorage_RootData::Read(Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.ReadRoot(aRootName, aRef, aTypeName);
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadRoot";
@@ -107,7 +107,7 @@ Standard_Boolean StdStorage_RootData::Write(Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.WriteRoot(aRoot->Name(), aRoot->Reference(), aRoot->Type());
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadRoot";
index 98b4ab4..3f2e136 100644 (file)
@@ -58,7 +58,7 @@ Standard_Boolean StdStorage_TypeData::Read(Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.ReadTypeInformations (aTypeNum, aTypeName);
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadTypeInformations";
@@ -106,7 +106,7 @@ Standard_Boolean StdStorage_TypeData::Write(Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.WriteTypeInformations(i, Type(i));
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "WriteTypeInformations";
index 8c2bed4..aa818d2 100644 (file)
@@ -494,7 +494,7 @@ Handle(Geom2d_Curve)  StepToTopoDS_TranslateEdge::MakePCurve
     }
     
   }
-  catch(Standard_Failure)
+  catch(Standard_Failure const&)
   {
     return C2d;
   }
index ddb2e6c..1f8f84c 100644 (file)
@@ -60,13 +60,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
                           myDataType,
                           myUserInfo);
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadInfo";
       return Standard_False;
     }
-    catch (Storage_StreamExtCharParityError)
+    catch (Storage_StreamExtCharParityError const&)
     {
       myErrorStatus = Storage_VSExtCharParityError;
       myErrorStatusExt = "ReadInfo";
@@ -95,13 +95,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.ReadComment (myComments);
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadComment";
       return Standard_False;
     }
-    catch (Storage_StreamExtCharParityError)
+    catch (Storage_StreamExtCharParityError const&)
     {
       myErrorStatus = Storage_VSExtCharParityError;
       myErrorStatusExt = "ReadComment";
index 41cd30f..8d546f5 100644 (file)
@@ -59,7 +59,7 @@ Standard_Boolean Storage_RootData::Read (Storage_BaseDriver& theDriver)
       OCC_CATCH_SIGNALS
       theDriver.ReadRoot (aRootName, aRef, aTypeName);
     }
-    catch (Storage_StreamTypeMismatchError)
+    catch (Storage_StreamTypeMismatchError const&)
     {
       myErrorStatus = Storage_VSTypeMismatch;
       myErrorStatusExt = "ReadRoot";
index f6e8007..da80ee0 100644 (file)
@@ -484,7 +484,7 @@ void Storage_Schema::Write
       errorContext = "EndWriteDataSection";
       f.EndWriteDataSection();
     }
-    catch(Storage_StreamWriteError) {
+    catch(Storage_StreamWriteError const&) {
       aData->SetErrorStatus(Storage_VSWriteError);
       aData->SetErrorStatusExtension(errorContext);
     }
index b4e0f91..a1e23d2 100644 (file)
@@ -457,7 +457,7 @@ Standard_Integer TColStd_PackedMapOfInteger::GetMinimalMapped () const
     }
     if (pFoundNode) {
       unsigned int aFullMask (0xffffffff);
-      aResult = TColStd_intMapNode_findNext ((const Standard_Address )pFoundNode, aFullMask);
+      aResult = TColStd_intMapNode_findNext ((Standard_Address )pFoundNode, aFullMask);
     }
   }
   return aResult;
@@ -486,7 +486,7 @@ Standard_Integer TColStd_PackedMapOfInteger::GetMaximalMapped () const
     }
     if (pFoundNode) {
       unsigned int aFullMask (0xffffffff);
-      aResult = TColStd_intMapNode_findPrev ((const Standard_Address )pFoundNode, aFullMask);
+      aResult = TColStd_intMapNode_findPrev ((Standard_Address )pFoundNode, aFullMask);
     }
   }
   return aResult;
index a8f230f..2cef0c0 100644 (file)
@@ -54,7 +54,7 @@ TDocStd_Application::TDocStd_Application()
     OCC_CATCH_SIGNALS
     S->LoadDriver();
   }
-  catch (Plugin_Failure)
+  catch (Plugin_Failure const&)
   {
     myIsDriverLoaded = Standard_False;
   }
index 1ad3ba3..a6f7a4e 100644 (file)
@@ -2106,7 +2106,7 @@ case TNaming_SHELLIN:
       break;
     }
   }
-} catch (Standard_Failure) {
+} catch (Standard_Failure const&) {
 #ifdef OCCT_DEBUG
   cout << "Name::Solve: EXCEPTION==> NameType = " << NameTypeToString(myType) << "  ";
   PrintEntry(aLab);
index b1431f4..86dfb37 100644 (file)
@@ -158,7 +158,7 @@ Standard_Boolean TObj_Model::Load (const TCollection_ExtendedString& theFile)
         {
           isValid = isValid && aLabel.Data() == aDoc->GetData();
         }
-        catch (Standard_Failure)
+        catch (Standard_Failure const&)
         {
           isValid = Standard_False;
         }
index 17e58e0..9f399f7 100644 (file)
@@ -2179,7 +2179,7 @@ void TPrsStd_ConstraintTools::ComputeRound(const Handle(TDataXtd_Constraint)& aC
        }
      }
    }
-   catch(Standard_Failure) {
+   catch(Standard_Failure const&) {
      ais.Nullify();
    }
  }
index 2d940a7..1f860a8 100644 (file)
@@ -181,7 +181,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
     OCC_CATCH_SIGNALS
     CA.Initialize (anEdge);
   }
-  catch (Standard_NullObject) {
+  catch (Standard_NullObject const&) {
     return Standard_False;
   }
 
index 59155c5..fb54527 100644 (file)
@@ -1062,7 +1062,7 @@ Handle(Transfer_Binder) Transfer_TransferProcess::Transferring(const TheStart& s
     }
 
     //    ...  Exceptions a Rattraper : elles ne se ressemblent pas toutes ... !
-    catch (Transfer_TransferDeadLoop) {
+    catch (Transfer_TransferDeadLoop const&) {
       if (binder.IsNull()) {
        themessenger << "                  *** Dead Loop with no Result" << endl;
        if (thetrace) StartTrace (binder, start, thelevel-1,0);
index 95f344f..2255815 100644 (file)
@@ -285,7 +285,7 @@ Standard_Boolean V3d_Viewer::AddZLayer (Graphic3d_ZLayerId& theLayerId)
     OCC_CATCH_SIGNALS
     theLayerId = myZLayerGenId.Next();
   }
-  catch (Aspect_IdentDefinitionError)
+  catch (Aspect_IdentDefinitionError const&)
   {
     // new index can't be generated
     return Standard_False;
index aec48cd..8890449 100644 (file)
@@ -2109,7 +2109,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
         {
           theGeomCircle = Cir.Value();
         }
-        catch (StdFail_NotDone)
+        catch (StdFail_NotDone const&)
         {
           std::cout << "vcircle error: can't create circle\n";
           return -1; // TCL_ERROR
@@ -2156,7 +2156,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
       {
         theGeomCircle = Cir.Value();
       }
-      catch (StdFail_NotDone)
+      catch (StdFail_NotDone const&)
       {
         std::cout << "vcircle error: can't create circle\n";
         return -1; // TCL_ERROR
@@ -2222,7 +2222,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
       {
         theGeomCircle = Cir.Value();
       }
-      catch (StdFail_NotDone)
+      catch (StdFail_NotDone const&)
       {
         std::cout << "vcircle error: can't create circle\n";
         return -1; // TCL_ERROR
@@ -2267,7 +2267,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
       {
         theGeomCircle = Cir.Value();
       }
-      catch (StdFail_NotDone)
+      catch (StdFail_NotDone const&)
       {
         std::cout << "vcircle error: can't create circle\n";
         return -1; // TCL_ERROR
index f0e231d..36a01a9 100644 (file)
@@ -79,7 +79,7 @@ const Handle(TopoDS_TShape)& VrmlData_Box::TShape ()
                              mySize.X(), mySize.Y(), mySize.Z());
       SetTShape (aShell.TShape());
       myIsModified = Standard_False;
-    } catch (Standard_Failure) {
+    } catch (Standard_Failure const&) {
       myTShape.Nullify();
     }
   }
@@ -159,7 +159,7 @@ const Handle(TopoDS_TShape)& VrmlData_Cone::TShape ()
       else
         myTShape = aBuilder.Shell().TShape();
       myIsModified = Standard_False;
-    } catch (Standard_Failure) {
+    } catch (Standard_Failure const&) {
       myTShape.Nullify();
     }
   }
@@ -289,7 +289,7 @@ const Handle(TopoDS_TShape)& VrmlData_Cylinder::TShape ()
         aShapeBuilder.AddShellFace (aShell, aBuilder.BottomFace());
       myTShape = aShell.TShape();
       myIsModified = Standard_False;
-    } catch (Standard_Failure) {
+    } catch (Standard_Failure const&) {
       myTShape.Nullify();
     }
   }
@@ -413,7 +413,7 @@ const Handle(TopoDS_TShape)& VrmlData_Sphere::TShape ()
     try {
       myTShape = BRepPrim_Sphere(myRadius).Shell().TShape();
       myIsModified = Standard_False;
-    } catch (Standard_Failure) {
+    } catch (Standard_Failure const&) {
       myTShape.Nullify();
     }
   }
index 821856c..f84ce2b 100644 (file)
@@ -79,7 +79,7 @@ static double TetraVol(gp_Pnt RefPoint, gp_Pnt Som1, gp_Pnt Som2, gp_Pnt Som3)
        N=v1^v2;
        Plane123=gp_Pln( Som1, gp_Dir( N ) );
       }
-    catch(Standard_Failure) {return(0.);}
+    catch(Standard_Failure const&) {return(0.);}
   }
   double L1, L2, L3;
   L1 = Som1.Distance(Som2);
@@ -575,7 +575,7 @@ static Standard_Integer CheckProps (Draw_Interpretor& di, Standard_Integer argc,
                 ( wholeDoc ? "" : "\n" ));
        di << string2;
       }
-      catch (Standard_Failure) {
+      catch (Standard_Failure const&) {
        //printf ( "%-16.16s", "exception" );
        char string3[260];
        Sprintf (string3, "%-16.16s", "exception" );
index 5f332bc..db3a05f 100644 (file)
@@ -868,7 +868,7 @@ static Standard_Integer meshcolors( Draw_Interpretor& di,
               try {
                 OCC_CATCH_SIGNALS
                 aScaleValue = (aCoords.Value(1) - (Standard_Real) aMinX) / aDelta;
-              } catch(Standard_Failure) {
+              } catch(Standard_Failure const&) {
                 aScaleValue = 0;
               }
 
@@ -893,7 +893,7 @@ static Standard_Integer meshcolors( Draw_Interpretor& di,
         }
       }
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
   {
     di << "Error\n";
   }
@@ -1212,7 +1212,7 @@ static Standard_Integer mesh_edge_width( Draw_Interpretor& di,
       aDrawer->SetDouble( MeshVS_DA_EdgeWidth, aWidth );
       anIC->Redisplay (aMesh, Standard_True);
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure const& )
   {
     di << "Error\n";
   }
index e4d888d..936272f 100644 (file)
@@ -293,7 +293,7 @@ void XmlLDrivers_DocumentRetrievalDriver::ReadFromDomDocument
         Standard_Integer aRefCounter = anInf.Token(" ",2).IntegerValue();
         theNewDocument->SetReferenceCounter(aRefCounter);
       }
-      catch (Standard_Failure) { 
+      catch (Standard_Failure const&) {
         //    cout << "warning: could not read the reference counter in " << aFileName << endl;
         TCollection_ExtendedString aMsg("Warning: ");
         aMsg = aMsg.Cat("could not read the reference counter").Cat("\0");
@@ -309,7 +309,7 @@ void XmlLDrivers_DocumentRetrievalDriver::ReadFromDomDocument
         Standard_Integer aModCounter = anInf.Token(" ",2).IntegerValue();
         theNewDocument->SetModifications (aModCounter);
       }
-      catch (Standard_Failure) { 
+      catch (Standard_Failure const&) {
         TCollection_ExtendedString aMsg("Warning: could not read the modification counter\0");
         if(!aMsgDriver.IsNull()) 
           aMsgDriver->Send(aMsg.ToExtString(), Message_Warning);
index 8e7a975..6b83774 100644 (file)
@@ -59,7 +59,7 @@ IMPLEMENT_DOMSTRING (Value,     "value")
 #ifdef _WIN32
 #define EXCEPTION ...
 #else
-#define EXCEPTION Standard_Failure
+#define EXCEPTION Standard_Failure const&
 #endif
 //=======================================================================
 //function : XmlMDataStd_NamedDataDriver
index e238276..04fc0c9 100644 (file)
@@ -184,7 +184,7 @@ void XmlMDataStd_RealArrayDriver::Paste (const Handle(TDF_Attribute)& theSource,
       OCC_CATCH_SIGNALS
       str.Allocate(25 * realArray.Length() + 1);
     }
-    catch (Standard_OutOfMemory)
+    catch (Standard_OutOfMemory const&)
     {
       // If allocation of big space for the string of double array values failed,
       // try to calculate the necessary space more accurate and allocate it.
index 988bab4..46a4e0b 100644 (file)
@@ -69,7 +69,7 @@ math_ComputeGaussPointsAndWeights::math_ComputeGaussPointsAndWeights(const Stand
       }      
       myIsDone = Standard_True;
     }
-  } catch (Standard_Failure) {
+  } catch (Standard_Failure const&) {
   }
 }
 
index e08a464..d8e1188 100644 (file)
@@ -162,7 +162,7 @@ math_ComputeKronrodPointsAndWeights::math_ComputeKronrodPointsAndWeights(const S
       }      
       myIsDone = Standard_True;
     }
-  } catch (Standard_Failure) {
+  } catch (Standard_Failure const&) {
   }
 }