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
This commit is contained in:
parent
e2a021c9e5
commit
7f786096da
4 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
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.
|
||||
|
||||
2007-11-15 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/34105
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue