X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=f00d3a4d5f4f506d93d01b9ec8de9feec342d7a8;hb=4b5a9b85aebed2ccc12fe282ee52be127235e052;hp=67c3edda9933cd8057ab5b4abcbced706b853803;hpb=a4be05bc3b1de5753d74501144c3ff1416606a12;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 67c3edda9..f00d3a4d5 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 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 @@ -56,6 +56,13 @@ using namespace std; +// Environment variable separator +#ifdef WIN32 + #define env_sep ';' +#else + #define env_sep ':' +#endif + //============================================================================= /*! * Constructor @@ -93,12 +100,12 @@ namespace SMESH_Gen::~SMESH_Gen() { - std::map < int, SMESH_Hypothesis * >::iterator i_hyp = _studyContext->mapHypothesis.begin(); - for ( ; i_hyp != _studyContext->mapHypothesis.end(); ++i_hyp ) - { - if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second )) - h->NullifyGen(); - } + std::map < int, SMESH_Hypothesis * >::iterator i_hyp = _studyContext->mapHypothesis.begin(); + for ( ; i_hyp != _studyContext->mapHypothesis.end(); ++i_hyp ) + { + if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second )) + h->NullifyGen(); + } delete _studyContext->myDocument; delete _studyContext; } @@ -984,7 +991,7 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths() while ( from < meshers.size() ) { // cut off plugin name - pos = meshers.find( ':', from ); + pos = meshers.find( env_sep, from ); if ( pos != string::npos ) plugin = meshers.substr( from, pos-from ); else