// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH SMDS : implementaion of Salome mesh data structure
+// SMESH SMDS : implementation of Salome mesh data structure
// File : SMDS_MeshIDFactory.cxx
// Author : Jean-Michel BOULCOURT
// Module : SMESH
else
{
set<int>::iterator i = myPoolOfID.begin();
- newid = *i;//myPoolOfID.top();
- myPoolOfID.erase( i );//myPoolOfID.pop();
+ newid = *i;
+ myPoolOfID.erase( i );
}
return newid;
}
while ( i != myPoolOfID.begin() && myMaxID == *i ) {
--myMaxID; --i;
}
- if ( myMaxID == *i )
+ if ( myMaxID == *i ) {
--myMaxID; // begin of myPoolOfID reached
- else
- ++i;
- myPoolOfID.erase( i, myPoolOfID.end() );
+ myPoolOfID.clear();
+ }
+ else if ( myMaxID < ID-1 ) {
+ myPoolOfID.erase( ++i, myPoolOfID.end() );
+ }
}
}
}