-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 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
#include <windows.h>
#endif
+#include <Basics_Utils.hxx>
+
using namespace std;
//=============================================================================
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;
}
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
- fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+ const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
+#else
+ const char* path = xmlPath.c_str();
+#endif
+ fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+ delete path;
+#endif
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif