X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshIDFactory.cxx;h=74e5e401df8fe78adc9c8fc3cef9dcd840ae3439;hb=8a1ff9ba77b7b72b64b08134f941b56aac80ff55;hp=20c90bda02d6dc96a342ab5af8cb2cc94cdd2ecd;hpb=a17b36970bc61da1d664453c615754997c925b18;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshIDFactory.cxx b/src/SMDS/SMDS_MeshIDFactory.cxx index 20c90bda0..74e5e401d 100644 --- a/src/SMDS/SMDS_MeshIDFactory.cxx +++ b/src/SMDS/SMDS_MeshIDFactory.cxx @@ -42,25 +42,23 @@ SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(0), myMesh(0) int SMDS_MeshIDFactory::GetFreeID() { - int newid; - if (myPoolOfID.empty()) - { - newid = ++myMaxID; - //MESSAGE("GetFreeID new " << newid); - } - else - { - set::iterator i = myPoolOfID.begin(); - newid = *i;//myPoolOfID.top(); - myPoolOfID.erase( i );//myPoolOfID.pop(); - //MESSAGE("GetFreeID pool " << newid); - } - return newid; + int newid; + if (myPoolOfID.empty()) + { + newid = ++myMaxID; + } + else + { + set::iterator i = myPoolOfID.begin(); + newid = *i;//myPoolOfID.top(); + myPoolOfID.erase( i );//myPoolOfID.pop(); + } + return newid; } //======================================================================= //function : ReleaseID -//purpose : +//purpose : //======================================================================= void SMDS_MeshIDFactory::ReleaseID(int ID, int vtkId) { @@ -91,24 +89,23 @@ void SMDS_MeshIDFactory::ReleaseID(int ID, int vtkId) void SMDS_MeshIDFactory::Clear() { - myMaxID = 0; - myPoolOfID.clear(); + myMaxID = 0; + myPoolOfID.clear(); } void SMDS_MeshIDFactory::SetMesh(SMDS_Mesh *mesh) { - myMesh = mesh; + myMesh = mesh; } SMDS_Mesh* SMDS_MeshIDFactory::GetMesh() { - return myMesh; + return myMesh; } void SMDS_MeshIDFactory::emptyPool(int maxId) { - MESSAGE("SMDS_MeshIDFactory::emptyPool " << myMaxID << " --> " << maxId); - myMaxID = maxId; - myPoolOfID.clear(); + myMaxID = maxId; + myPoolOfID.clear(); }