[libcxx] r192548 - Patch from GM to make more implicit bools explicit since we can't stop MSVC warning about this in headers and to warn is the MSVC default. No functionality change.
Marshall Clow
mclow.lists at gmail.com
Sat Oct 12 18:02:46 PDT 2013
Author: marshall
Date: Sat Oct 12 20:02:45 2013
New Revision: 192548
URL: http://llvm.org/viewvc/llvm-project?rev=192548&view=rev
Log:
Patch from GM to make more implicit bools explicit since we can't stop MSVC warning about this in headers and to warn is the MSVC default. No functionality change.
Modified:
libcxx/trunk/include/future
libcxx/trunk/include/locale
libcxx/trunk/src/strstream.cpp
Modified: libcxx/trunk/include/future
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/future?rev=192548&r1=192547&r2=192548&view=diff
==============================================================================
--- libcxx/trunk/include/future (original)
+++ libcxx/trunk/include/future Sat Oct 12 20:02:45 2013
@@ -542,14 +542,14 @@ public:
__state_ |= __future_attached;
}
_LIBCPP_INLINE_VISIBILITY
- bool __has_future_attached() const {return __state_ & __future_attached;}
+ bool __has_future_attached() const {return (__state_ & __future_attached) != 0;}
_LIBCPP_INLINE_VISIBILITY
void __set_deferred() {__state_ |= deferred;}
void __make_ready();
_LIBCPP_INLINE_VISIBILITY
- bool __is_ready() const {return __state_ & ready;}
+ bool __is_ready() const {return (__state_ & ready) != 0;}
void set_value();
void set_value_at_thread_exit();
Modified: libcxx/trunk/include/locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/locale?rev=192548&r1=192547&r2=192548&view=diff
==============================================================================
--- libcxx/trunk/include/locale (original)
+++ libcxx/trunk/include/locale Sat Oct 12 20:02:45 2013
@@ -3331,7 +3331,7 @@ money_get<_CharT, _InputIterator>::__do_
bool __more_needed = __trailing_sign ||
(__p < 2) ||
(__p == 2 && __pat.field[3] != static_cast<char>(money_base::none));
- bool __sb = __flags & ios_base::showbase;
+ bool __sb = (__flags & ios_base::showbase) != 0;
if (__sb || __more_needed)
{
typename string_type::const_iterator __sym_space_end = __sym.begin();
Modified: libcxx/trunk/src/strstream.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/strstream.cpp?rev=192548&r1=192547&r2=192548&view=diff
==============================================================================
--- libcxx/trunk/src/strstream.cpp (original)
+++ libcxx/trunk/src/strstream.cpp Sat Oct 12 20:02:45 2013
@@ -229,8 +229,8 @@ strstreambuf::pos_type
strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which)
{
off_type __p(-1);
- bool pos_in = __which & ios::in;
- bool pos_out = __which & ios::out;
+ bool pos_in = (__which & ios::in) != 0;
+ bool pos_out = (__which & ios::out) != 0;
bool legal = false;
switch (__way)
{
@@ -287,8 +287,8 @@ strstreambuf::pos_type
strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
{
off_type __p(-1);
- bool pos_in = __which & ios::in;
- bool pos_out = __which & ios::out;
+ bool pos_in = (__which & ios::in) != 0;
+ bool pos_out = (__which & ios::out) != 0;
if (pos_in || pos_out)
{
if (!((pos_in && gptr() == nullptr) || (pos_out && pptr() == nullptr)))
More information about the cfe-commits
mailing list