From fe28f1d09fa19c46cc8719170d392b63518cfaba Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 27 Feb 2019 18:36:37 +0300 Subject: [PATCH] Some corrections. --- src/Basics/Basics_DirUtils.cxx | 4 ++-- src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx index afcadf2ed..9e9542567 100644 --- a/src/Basics/Basics_DirUtils.cxx +++ b/src/Basics/Basics_DirUtils.cxx @@ -219,7 +219,7 @@ namespace Kernel_Utils #ifdef UNICODE std::wstring aPathToCheck = utf8_decode_s( thePath ); #else - aPathToCheck = thePath; + std::string aPathToCheck = thePath; #endif if ( GetFileAttributes ( aPathToCheck.c_str() ) == 0xFFFFFFFF ) { if ( GetLastError () == FILE_ATTRIBUTE_READONLY ) { @@ -304,7 +304,7 @@ namespace Kernel_Utils #ifdef UNICODE std::wstring aPathToCheck = utf8_decode_s(thePath); #else - aPathToCheck = thePath; + std::string aPathToCheck = thePath; #endif HANDLE hFile = FindFirstFile( aPathToCheck.c_str(), &aFileData ); diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx index 2bcb37dc2..08ef765f5 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx @@ -63,7 +63,11 @@ std::string SALOMEDS_AttributeStudyProperties::GetUserName() #ifndef WIN32 else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserName(); #else +#ifdef UNICODE else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserNameW(); +#else + else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserNameA(); +#endif #endif return aName; } -- 2.39.2