Skip to content

Commit

Permalink
fix Mingw build (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored Oct 20, 2021
1 parent 1bfc10e commit 98c594e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mdal/mdal_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ std::string MDAL::getEnvVar( const std::string &varname, const std::string &defa

bool MDAL::openInputFile( std::ifstream &inputFileStream, const std::string &fileName, std::ios_base::openmode mode )
{
#if defined _WIN32
#if defined _MSC_VER
std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
std::wstring wStr = converter.from_bytes( fileName );
inputFileStream.open( wStr, std::ifstream::in | mode );
Expand All @@ -52,7 +52,7 @@ std::ifstream MDAL::openInputFile( const std::string &fileName, std::ios_base::o
{
std::ifstream ret;

#if defined _WIN32
#if defined _MSC_VER
std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
std::wstring wStr = converter.from_bytes( fileName );
ret.open( wStr, mode );
Expand All @@ -67,7 +67,7 @@ std::ofstream MDAL::openOutputFile( const std::string &fileName, std::ios_base::
{
std::ofstream ret;

#if defined _WIN32
#if defined _MSC_VER
std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
std::wstring wStr = converter.from_bytes( fileName );
ret.open( wStr, mode );
Expand Down

0 comments on commit 98c594e

Please sign in to comment.