[libcxx] r193085 - Patch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>
Marshall Clow
mclow.lists at gmail.com
Mon Oct 21 07:41:05 PDT 2013
Author: marshall
Date: Mon Oct 21 09:41:05 2013
New Revision: 193085
URL: http://llvm.org/viewvc/llvm-project?rev=193085&view=rev
Log:
Patch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>
Modified:
libcxx/trunk/include/__locale
libcxx/trunk/include/ios
Modified: libcxx/trunk/include/__locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=193085&r1=193084&r2=193085&view=diff
==============================================================================
--- libcxx/trunk/include/__locale (original)
+++ libcxx/trunk/include/__locale Mon Oct 21 09:41:05 2013
@@ -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
Modified: libcxx/trunk/include/ios
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/ios?rev=193085&r1=193084&r2=193085&view=diff
==============================================================================
--- libcxx/trunk/include/ios (original)
+++ libcxx/trunk/include/ios Mon Oct 21 09:41:05 2013
@@ -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
More information about the cfe-commits
mailing list