X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshNode.cxx;h=3bd528bb766e2a5087596d7a1a5808e8605da430;hb=897fdb92b6c3bd5cfc749bde222355992ecffc13;hp=dd7bf6a423d1fa22038dfb91031b927992543276;hpb=251f8c052dd12dd29922210dc901b295fe999a0e;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshNode.cxx b/src/SMDS/SMDS_MeshNode.cxx index dd7bf6a42..3bd528bb7 100644 --- a/src/SMDS/SMDS_MeshNode.cxx +++ b/src/SMDS/SMDS_MeshNode.cxx @@ -126,7 +126,7 @@ void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos) const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const { - return myPosition; + return myPosition; } //======================================================================= @@ -149,30 +149,26 @@ public: SMDS_MeshNode_MyInvIterator(SMDS_Mesh *mesh, vtkIdType* cells, int ncells, SMDSAbs_ElementType type) : myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0) { - //MESSAGE("SMDS_MeshNode_MyInvIterator : ncells " << myNcells); - cellList.clear(); + cellList.reserve( ncells ); if (type == SMDSAbs_All) + cellList.assign( cells, cells + ncells ); + else for (int i = 0; i < ncells; i++) - cellList.push_back(cells[i]); - else for (int i = 0; i < ncells; i++) { int vtkId = cells[i]; int smdsId = myMesh->fromVtkToSmds(vtkId); const SMDS_MeshElement* elem = myMesh->FindElement(smdsId); if (elem->GetType() == type) - { - //MESSAGE("Add element vtkId " << vtkId << " " << elem->GetType()) - cellList.push_back(vtkId); - } + { + cellList.push_back(vtkId); + } } myCells = cellList.empty() ? 0 : &cellList[0]; myNcells = cellList.size(); - //MESSAGE("myNcells="<