Salome HOME
Fix valgrind error: Mismatched free() / delete / delete []
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Gluer2_3.cxx
index f2a8845f33850d1c029e2e253efb938ee62f9740..180786cfd0b2845a8f657c29113df505752a62a8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_Tools.hxx>
+#include <GEOMAlgo_CoupleOfShapes.hxx>
+#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
+#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
 
+#include <GEOMAlgo_AlgoTools.hxx>
 #include <GEOMAlgo_GlueDetector.hxx>
+#include <GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
 
 
 static
@@ -130,9 +130,9 @@ void GEOMAlgo_Gluer2::PerformShapesToWork()
   Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD;
   TopTools_ListIteratorOfListOfShape aItLS1, aItLS2;
   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
-  NMTTools_CoupleOfShape aCS;
-  NMTTools_ListOfCoupleOfShape aLCS;
-  NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
+  GEOMAlgo_CoupleOfShapes aCS;
+  GEOMAlgo_ListOfCoupleOfShapes aLCS;
+  GEOMAlgo_ListIteratorOfListOfCoupleOfShapes aItCS;
   //
   myErrorStatus=0;
   myWarningStatus=0;
@@ -186,9 +186,9 @@ void GEOMAlgo_Gluer2::PerformShapesToWork()
   //
   // 2. Find Chains
   TopTools_ListOfShape aLSX;
-  NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
+  GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape aMC;
   //
-  NMTTools_Tools::FindChains(aLCS, aMC);
+  GEOMAlgo_AlgoTools::FindChains(aLCS, aMC);
   //
   // 3. myImagesToWork, myOriginsToWork
   aNbC=aMC.Extent();
@@ -209,8 +209,8 @@ void GEOMAlgo_Gluer2::PerformShapesToWork()
 //function : TreatPair
 //purpose  :
 //=======================================================================
-void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS,
-                                NMTTools_ListOfCoupleOfShape& aLCS)
+void GEOMAlgo_Gluer2::TreatPair(const GEOMAlgo_CoupleOfShapes& aCS,
+                                GEOMAlgo_ListOfCoupleOfShapes& aLCS)
 {
   if (myErrorStatus) {
     return;
@@ -222,7 +222,7 @@ void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS,
   TopTools_IndexedMapOfShape aMS1, aMS2;
   TopTools_DataMapOfShapeListOfShape aDMSLS;
   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
-  NMTTools_CoupleOfShape aCSS;
+  GEOMAlgo_CoupleOfShapes aCSS;
   //
   // 1. Checking the pair on whether it can be glued at all
   // 1.1