mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
0020183: EDF SMESH 966 : Mesh element info anomaly
fix GetElemObjId() and GetNodeObjId: prevent out_of_range error if id==vector.size()
This commit is contained in:
parent
efb752bab0
commit
f600e22b18
@ -58,22 +58,14 @@ SMESH_ExtractGeometry::~SMESH_ExtractGeometry(){}
|
||||
|
||||
|
||||
vtkIdType SMESH_ExtractGeometry::GetElemObjId(int theVtkID){
|
||||
if(myElemVTK2ObjIds.empty() || theVtkID > myElemVTK2ObjIds.size()) return -1;
|
||||
#if defined __GNUC_2__
|
||||
if( theVtkID < 0 || theVtkID >= myElemVTK2ObjIds.size()) return -1;
|
||||
return myElemVTK2ObjIds[theVtkID];
|
||||
#else
|
||||
return myElemVTK2ObjIds.at(theVtkID);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
vtkIdType SMESH_ExtractGeometry::GetNodeObjId(int theVtkID){
|
||||
if(myNodeVTK2ObjIds.empty() || theVtkID > myNodeVTK2ObjIds.size()) return -1;
|
||||
#if defined __GNUC_2__
|
||||
if ( theVtkID < 0 || theVtkID >= myNodeVTK2ObjIds.size()) return -1;
|
||||
return myNodeVTK2ObjIds[theVtkID];
|
||||
#else
|
||||
return myNodeVTK2ObjIds.at(theVtkID);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user