Salome HOME
Fix compilation error on gcc 4.2
[modules/smesh.git] / src / SMESHDS / SMESHDS_GroupOnGeom.cxx
index 5fae9fda2ff724ab00753a9eec05cd07d2d3aae7..7382330dbe7f3cd6403ba34cb54ba2e7136a06a4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESHDS_GroupOnGeom.cxx
 //  Module : SMESH
@@ -65,13 +66,14 @@ class MyIterator: public SMDS_ElemIterator
   MyIterator(SMDSAbs_ElementType type, const SMESHDS_SubMesh* subMesh)
     : myType(type), myElem(0)
   {
-    if ( subMesh ) 
+    if ( subMesh ) {
       if ( myType == SMDSAbs_Node )
         myNodeIt = subMesh->GetNodes();
       else {
         myElemIt = subMesh->GetElements();
         next();
       }
+    }
   }
   bool more()
   {
@@ -101,7 +103,7 @@ class MyIterator: public SMDS_ElemIterator
 //purpose  : 
 //=======================================================================
 
-SMDS_ElemIteratorPtr SMESHDS_GroupOnGeom::GetElements()
+SMDS_ElemIteratorPtr SMESHDS_GroupOnGeom::GetElements() const
 {
   return SMDS_ElemIteratorPtr( new MyIterator ( GetType(), mySubMesh ));
 }