summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2013-10-13 01:02:45 +0000
committerMarshall Clow <mclow.lists@gmail.com>2013-10-13 01:02:45 +0000
commit9de3d4cab3ac91362e2a30406cd005cdc581eec5 (patch)
tree34a2aae16b0782140ea9b684f086d74794b8f25e
parent0f91166ef8f521bae91f9bc88e9a97bba9d2eaa0 (diff)
downloadexternal_libcxx-9de3d4cab3ac91362e2a30406cd005cdc581eec5.tar.gz
external_libcxx-9de3d4cab3ac91362e2a30406cd005cdc581eec5.tar.bz2
external_libcxx-9de3d4cab3ac91362e2a30406cd005cdc581eec5.zip
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192548 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/future4
-rw-r--r--include/locale2
-rw-r--r--src/strstream.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/include/future b/include/future
index 2d969df1b..ff8e59b17 100644
--- a/include/future
+++ b/include/future
@@ -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();
diff --git a/include/locale b/include/locale
index 40e33c22e..ab7a7d45a 100644
--- a/include/locale
+++ b/include/locale
@@ -3331,7 +3331,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
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();
diff --git a/src/strstream.cpp b/src/strstream.cpp
index 08a78a74f..c1965ea37 100644
--- a/src/strstream.cpp
+++ b/src/strstream.cpp
@@ -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)))