X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_File.cxx;h=1e249c43089790f7fb640714a8481b8878445da5;hb=b1e37287d48c9d7eddae4bc4cad09857bde5a47b;hp=a8983d247e1c25c84edbb09bd186ebe904d3e87d;hpb=58a7aa4445314783449856504f994d259f21d091;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index a8983d247..1e249c430 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 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 );