Salome HOME
Fix compilation error on gcc 4.2
[modules/smesh.git] / src / SMESHDS / SMESHDS_GroupOnGeom.cxx
index abd5d552b66a5809209fd7a9cf046ca406bf6842..7382330dbe7f3cd6403ba34cb54ba2e7136a06a4 100644 (file)
@@ -66,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()
   {
@@ -102,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 ));
 }