From f377659e8246493e9e4617df27bab0cd56f10405 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 16 May 2013 16:33:34 +0000 Subject: [PATCH] 0022100: EDF 2413 SMESH: Take into account TRIA7 Fix AddNode() for the case if a node already in --- src/SMESHDS/SMESHDS_SubMesh.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMESHDS/SMESHDS_SubMesh.cxx b/src/SMESHDS/SMESHDS_SubMesh.cxx index 76b131c89..b27ea7b4f 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.cxx +++ b/src/SMESHDS/SMESHDS_SubMesh.cxx @@ -160,14 +160,14 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N) { if ( !IsComplexSubmesh() ) { - int idInSubShape = N->getIdInShape(); - int shapeId = N->getshapeId(); + const int idInSubShape = N->getIdInShape(); + const int shapeId = N->getshapeId(); if ((shapeId > 0) && (idInSubShape >= 0)) { if ( shapeId != myIndex ) throw SALOME_Exception (LOCALIZED("a node being in sub-mesh is added to another sub-mesh")); - if ( idInSubShape >= NbNodes() || myNodes[ idInSubShape ] != N ) + if ( idInSubShape >= myNodes.size() || myNodes[ idInSubShape ] != N ) throw SALOME_Exception (LOCALIZED("a node with wrong idInSubShape is re-added to the same sub-mesh")); return; // already in -- 2.39.2