From 8a43fca8edade4efb453bad10243841738e6dfba Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 21 Oct 2013 14:41:05 +0000 Subject: [PATCH] Patch by GM: Making implicit conversion to bool explicit in and <__locale> git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193085 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__locale | 2 +- include/ios | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/__locale b/include/__locale index 3bf617d6..2073e1b8 100644 --- a/include/__locale +++ b/include/__locale @@ -512,7 +512,7 @@ public: _LIBCPP_ALWAYS_INLINE bool is(mask __m, char_type __c) const { - return isascii(__c) ? __tab_[static_cast(__c)] & __m : false; + return isascii(__c) ? (__tab_[static_cast(__c)] & __m) !=0 : false; } _LIBCPP_ALWAYS_INLINE diff --git a/include/ios b/include/ios index 0dd328d8..d95f18a5 100644 --- a/include/ios +++ b/include/ios @@ -535,21 +535,21 @@ inline _LIBCPP_INLINE_VISIBILITY bool ios_base::eof() const { - return __rdstate_ & eofbit; + return (__rdstate_ & eofbit) != 0; } inline _LIBCPP_INLINE_VISIBILITY bool ios_base::fail() const { - return __rdstate_ & (failbit | badbit); + return (__rdstate_ & (failbit | badbit)) != 0; } inline _LIBCPP_INLINE_VISIBILITY bool ios_base::bad() const { - return __rdstate_ & badbit; + return (__rdstate_ & badbit) != 0; } inline _LIBCPP_INLINE_VISIBILITY