aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-11-15 22:59:12 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-11-15 22:59:12 +0000
commit7f786096da00a39939da4a77f330d42b24ad0d06 (patch)
tree685affe51757dd34c81647649a57489b661405af /libstdc++-v3/include
parente2a021c9e581eea4d68b5b53308d282e90dff797 (diff)
downloadgcc-7f786096da00a39939da4a77f330d42b24ad0d06.zip
gcc-7f786096da00a39939da4a77f330d42b24ad0d06.tar.gz
gcc-7f786096da00a39939da4a77f330d42b24ad0d06.tar.bz2
istream.tcc (basic_istream<>::sentry:: sentry(basic_istream<>&, bool)): Explicitely convert to bool.
2007-11-15 Paolo Carlini <pcarlini@suse.de> * include/bits/istream.tcc (basic_istream<>::sentry:: sentry(basic_istream<>&, bool)): Explicitely convert to bool. * include/bits/locale_facets.tcc (num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT)): Likewise. * include/std/ostream (basic_ostream<>::sentry::~sentry): Likewise. From-SVN: r130211
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/istream.tcc2
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc4
-rw-r--r--libstdc++-v3/include/std/ostream2
3 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 2e65b48..440d234 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__in.tie())
__in.tie()->flush();
- if (!__noskip && (__in.flags() & ios_base::skipws))
+ if (!__noskip && bool(__in.flags() & ios_base::skipws))
{
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 1b714ad..000d6fb 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -876,14 +876,14 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
// Decimal.
if (__v > 0)
{
- if (__flags & ios_base::showpos
+ if (bool(__flags & ios_base::showpos)
&& __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
*--__cs = __lit[__num_base::_S_oplus], ++__len;
}
else if (__v)
*--__cs = __lit[__num_base::_S_ominus], ++__len;
}
- else if (__flags & ios_base::showbase && __v)
+ else if (bool(__flags & ios_base::showbase) && __v)
{
if (__basefield == ios_base::oct)
*--__cs = __lit[__num_base::_S_odigits], ++__len;
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index 4fb6d19..db9c911 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -416,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
~sentry()
{
// XXX MT
- if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
+ if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
{
// Can't call flush directly or else will get into recursive lock.
if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)