2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-21 15:12:30 +00:00

Use standard-compliant operations of std::ios_base::openmode

This commit is contained in:
Alexander Grund
2020-02-24 16:51:13 +01:00
parent 9e2d028864
commit 5d5bcae847

View File

@@ -92,9 +92,9 @@ namespace nowide {
if(is_open())
return NULL;
validate_cvt(this->getloc());
const bool ate = bool(mode & std::ios_base::ate);
const bool ate = (mode & std::ios_base::ate) != 0;
if(ate)
mode = mode ^ std::ios_base::ate;
mode &= ~std::ios_base::ate;
const wchar_t* smode = get_mode(mode);
if(!smode)
return 0;