]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
Salome HOME
Remove unnecessary includes
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IGroupOperations.cxx
index 49675b0ade678f187c10051ed120b7103651561c..7c2b185700993b16b952ef3b8ca0d79e4b3019c7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  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
@@ -18,6 +18,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include <Standard_Stream.hxx>
 
 #include <GEOM_PythonDump.hxx>
 
 #include "utilities.h"
-#include <OpUtil.hxx>
 #include <Utils_ExceptHandlers.hxx>
 
 #include <TFunction_DriverTable.hxx>
 #include <TFunction_Driver.hxx>
-#include <TFunction_Logbook.hxx>
 #include <TDF_Tool.hxx>
 #include <TDataStd_Integer.hxx>
 
@@ -53,8 +52,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
 }
@@ -82,7 +81,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CreateGroup
 
   if ( theShapeType != TopAbs_VERTEX && theShapeType != TopAbs_EDGE &&
        theShapeType != TopAbs_FACE && theShapeType != TopAbs_SOLID ) {
-    SetErrorCode( "Error: You could create group only next type: vertex, edge, face or solid" );
+    SetErrorCode( "Error: You could create group of only next type: vertex, edge, face or solid" );
     return NULL;
   }
 
@@ -1142,7 +1141,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::UnionListOfGroups
     return NULL;
   }
 
-  TopAbs_ShapeEnum aType, aType_i;
+  TopAbs_ShapeEnum aType = TopAbs_SHAPE, aType_i;   // todo: refactor: aType must be initialized to avoid warning (see below)
   TDF_Label aLabel, aLabel_i;
   TColStd_ListOfInteger aNewIDs;
   TColStd_MapOfInteger mapIDs;
@@ -1160,7 +1159,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::UnionListOfGroups
       aType = aType_i;
     else {
       if (aType_i != aType) {
-        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) {
+        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) { // todo: refactor: aType must be initialized to avoid warning (see above)
           if (aType_i == TopAbs_SHAPE || aType_i == TopAbs_COMPOUND)
             aType = aType_i;
           else {
@@ -1257,7 +1256,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::IntersectListOfGroups
     return NULL;
   }
 
-  TopAbs_ShapeEnum aType, aType_i;
+  TopAbs_ShapeEnum aType = TopAbs_SHAPE, aType_i; // todo: refactor: aType must be initialized to avoid warning (see below)
   TDF_Label aLabel, aLabel_i;
   TColStd_ListOfInteger aNewIDs;
   TColStd_MapOfInteger mapIDs;
@@ -1275,7 +1274,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::IntersectListOfGroups
       aType = aType_i;
     else {
       if (aType_i != aType) {
-        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) {
+        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) { // todo: refactor: aType must be initialized to avoid warning (see above)
           if (aType_i == TopAbs_SHAPE || aType_i == TopAbs_COMPOUND)
             aType = aType_i;
           else {
@@ -1398,7 +1397,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CutListOfGroups
     return NULL;
   }
 
-  TopAbs_ShapeEnum aType, aType_i;
+  TopAbs_ShapeEnum aType = TopAbs_SHAPE, aType_i; // todo: refactor: aType must be initialized to avoid warning (see below)
   TDF_Label aLabel, aLabel_i;
   TColStd_ListOfInteger aNewIDs;
   TColStd_MapOfInteger mapIDs;
@@ -1470,7 +1469,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CutListOfGroups
       aType = aType_i;
     else {
       if (aType_i != aType) {
-        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) {
+        if (aType != TopAbs_SHAPE && aType != TopAbs_COMPOUND) { // todo: refactor: aType must be initialized to avoid warning (see above)
           if (aType_i == TopAbs_SHAPE || aType_i == TopAbs_COMPOUND)
             aType = aType_i;
           else {