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.
llvm-svn: 192548
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 9f21325ac732ab6f0b57dbad7f2099b0679156cf
diff --git a/src/strstream.cpp b/src/strstream.cpp
index 08a78a7..c1965ea 100644
--- a/src/strstream.cpp
+++ b/src/strstream.cpp
@@ -229,8 +229,8 @@
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::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)))