X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FOBJECT%2FSMESH_ActorUtils.cxx;h=203f7931be9664c192c4c1cf4dc76c01e3a3e862;hb=f016bdf914220827ec8f9a7048bc78fc3fb8c299;hp=9ce8b05672ae932002c0182a3d2da8b77a264c17;hpb=ae29d465091933df101dfac6ae99d3becf4efde7;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index 9ce8b0567..203f7931b 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -157,17 +157,17 @@ namespace SMESH } } - std::map GetEntitiesFromObject(SMESH_VisualObj *theObject) { - std::map entities; - entities.insert(std::pair(SMDSAbs_0DElement, + std::map GetEntitiesFromObject(SMESH_VisualObj *theObject) { + std::map entities; + entities.insert(std::pair(SMDSAbs_0DElement, theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0)); - entities.insert(std::pair(SMDSAbs_Ball, + entities.insert(std::pair(SMDSAbs_Ball, theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0)); - entities.insert(std::pair(SMDSAbs_Edge, + entities.insert(std::pair(SMDSAbs_Edge, theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0)); - entities.insert(std::pair(SMDSAbs_Face, + entities.insert(std::pair(SMDSAbs_Face, theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0)); - entities.insert(std::pair(SMDSAbs_Volume, + entities.insert(std::pair(SMDSAbs_Volume, theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0)); return entities; }