Salome HOME
Porting to Mandrake 10.1 and new products:
authormpv <mpv@opencascade.com>
Wed, 8 Jun 2005 06:08:49 +0000 (06:08 +0000)
committermpv <mpv@opencascade.com>
Wed, 8 Jun 2005 06:08:49 +0000 (06:08 +0000)
porting to gcc 3.4.1 and OCC 5.2.3: do not use copy constructor in TCollection classes

src/GEOMImpl/GEOMImpl_Block6Explorer.cxx
src/GEOMImpl/GEOMImpl_BlockDriver.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx

index 71987a990e9ed8aa34fe0496304fd7a2cc41251a..0ce84d4ba8c611e475b57d452247f4963f1e7186 100644 (file)
@@ -1167,9 +1167,9 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire&     theWire,
     BRepOffsetAPI_MakeFilling MF;
 
     Standard_Integer nbEdges = 0;
-    BRepTools_WireExplorer aWE (theWire);
-    for (; aWE.More(); aWE.Next(), nbEdges++) {
-      MF.Add(TopoDS::Edge(aWE.Current()), GeomAbs_C0);
+    BRepTools_WireExplorer* aWE = new BRepTools_WireExplorer (theWire);
+    for (; aWE->More(); aWE->Next(), nbEdges++) {
+      MF.Add(TopoDS::Edge(aWE->Current()), GeomAbs_C0);
     }
 
     MF.Build();
@@ -1181,10 +1181,10 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire&     theWire,
       Standard_Real aTol = MF.G0Error();
 
       TColgp_Array1OfPnt aPnts (1,nbEdges); // points of the given wire
-      aWE = BRepTools_WireExplorer(theWire);
+      aWE = new BRepTools_WireExplorer(theWire);
       Standard_Integer vi = 1;
-      for (; aWE.More() && vi <= nbEdges; aWE.Next(), vi++) {
-        aPnts(vi) = BRep_Tool::Pnt(TopoDS::Vertex(aWE.CurrentVertex()));
+      for (; aWE->More() && vi <= nbEdges; aWE->Next(), vi++) {
+        aPnts(vi) = BRep_Tool::Pnt(TopoDS::Vertex(aWE->CurrentVertex()));
       }
 
       // Find maximum deviation in vertices
index cad20102e8295bdea6863e33824cfe63332c19cc..f9254f8d6194b2d9ffe7e2893f693164e64105aa 100644 (file)
@@ -201,17 +201,18 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
       }
 
       // build wire in right order, corresponding to edges connexity
-      BRepBuilderAPI_MakeWire MW;
+      BRepBuilderAPI_MakeWire* MW;
       if (isConnected12)
-        MW = BRepBuilderAPI_MakeWire(anEdge1, anEdge2, anEdge3, anEdge4);
+        MW = new BRepBuilderAPI_MakeWire(anEdge1, anEdge2, anEdge3, anEdge4);
       else
-        MW = BRepBuilderAPI_MakeWire(anEdge1, anEdge3, anEdge2, anEdge4);
+        MW = new BRepBuilderAPI_MakeWire(anEdge1, anEdge3, anEdge2, anEdge4);
 
-      if (!MW.IsDone()) {
+      if (!MW->IsDone()) {
         Standard_ConstructionError::Raise
           ("Impossible to build a connected wire from the given edges");
       }
-      TopoDS_Wire aWire = MW;
+      TopoDS_Wire aWire = *MW;
+      delete MW;
       if (!aWire.Closed()) {
         Standard_ConstructionError::Raise
           ("Impossible to build a closed wire from the given edges");
index c6c4f1c00c22940f6c91d39fb8e4300f55831439..41750e506707e8c94908ea252f2d12566e7a17a7 100644 (file)
@@ -811,7 +811,10 @@ void GEOMImpl_IMeasureOperations::GetProblemShapes (const BRepCheck_Analyzer&
   TopAbs_ShapeEnum styp = theShape.ShapeType();
   BRepCheck_ListIteratorOfListOfStatus itl;
   if (!theMap.IsBound(theShape)) {
-    theMap.Bind(theShape,TopTools_ListOfShape());
+    // mpv: porting to gcc 3.4.1 and OCC 5.2.3
+    //theMap.Bind(theShape,TopTools_ListOfShape());
+    TopTools_ListOfShape empty;
+    theMap.Bind(theShape, empty);
 
     if (!theAna.Result(theShape).IsNull()) {
       itl.Initialize(theAna.Result(theShape)->Status());