Patch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ac5cce17c
commit
8a43fca8ed
@ -512,7 +512,7 @@ public:
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
bool is(mask __m, char_type __c) const
|
||||
{
|
||||
return isascii(__c) ? __tab_[static_cast<int>(__c)] & __m : false;
|
||||
return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false;
|
||||
}
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user