From baf5f7929a627ca39d81745ae47ba072187abde1 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 8 Jun 2005 06:08:49 +0000 Subject: [PATCH] Porting to Mandrake 10.1 and new products: porting to gcc 3.4.1 and OCC 5.2.3: do not use copy constructor in TCollection classes --- src/GEOMImpl/GEOMImpl_Block6Explorer.cxx | 12 ++++++------ src/GEOMImpl/GEOMImpl_BlockDriver.cxx | 11 ++++++----- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 5 ++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx b/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx index 71987a990..0ce84d4ba 100644 --- a/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx +++ b/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx @@ -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 diff --git a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx index cad20102e..f9254f8d6 100644 --- a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx @@ -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"); diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index c6c4f1c00..41750e506 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -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()); -- 2.39.2