X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_File.cxx;h=9e3d7526314af709832941d0e16a57fcb838943e;hp=86723df99b07cc96493c3d9f3f30a1e0ef7fb647;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hpb=a274ade365bd0f0e19d56c577acc4a13aa1972a7 diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index 86723df99..9e3d75263 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -81,12 +81,12 @@ bool SMESH_File::open() if ( !_map && length > 0 ) { #ifdef WIN32 -#ifdef UNICODE +# ifdef UNICODE std::wstring aName = Kernel_Utils::utf8_decode_s(_name); const wchar_t* name = aName.c_str(); -#else +# else char* name = _name.data(); -#endif +# endif _file = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); bool ok = ( _file != INVALID_HANDLE_VALUE );