X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDWrapper%2FMED_Structures.cxx;h=7bc99345ff11ac92d7c91920ef7f43f42ec793c0;hb=HEAD;hp=aa7777c10702cf4139ae7a449bd5e03f16c4dfb3;hpb=16a07c876163e3c993e41db77e9181789b7324b8;p=modules%2Fsmesh.git diff --git a/src/MEDWrapper/MED_Structures.cxx b/src/MEDWrapper/MED_Structures.cxx index aa7777c10..7bc99345f 100644 --- a/src/MEDWrapper/MED_Structures.cxx +++ b/src/MEDWrapper/MED_Structures.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -141,7 +141,8 @@ namespace MED TElemInfo ::SetElemNum(TInt theId, TInt theVal) { - (*myElemNum)[theId] = theVal; + if ( IsElemNum() ) + (*myElemNum)[theId] = theVal; } //--------------------------------------------------------------- @@ -352,10 +353,10 @@ namespace MED TGaussInfo::TLess ::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const { - if(!&theLeft) // todo: address of reference can be assumed always non-null by compiler + if(!&theLeft) // address of reference can be assumed always non-null by compiler - OK return true; - if(!&theRight) // todo: address of reference can be assumed always non-null by compiler + if(!&theRight) //address of reference can be assumed always non-null by compiler - OK return false; if(theLeft.myGeom != theRight.myGeom)