From: Petur Runolfsson Date: Mon, 22 Sep 2003 18:29:56 +0000 (+0000) Subject: istream.tcc (basic_istream::read, [...]): Avoid redundant setstate(failbit) calls... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89ec0c4ba6ae53e5b675ee027fe3529dc6c11f62;p=gcc.git istream.tcc (basic_istream::read, [...]): Avoid redundant setstate(failbit) calls when sentry::operator bool() returns false. 2003-09-22 Petur Runolfsson * include/bits/istream.tcc (basic_istream::read, basic_istream::readsome, basic_istream::putback, basic_istream::unget, operator>>(basic_istream, CharT)): Avoid redundant setstate(failbit) calls when sentry::operator bool() returns false. From-SVN: r71662 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 959e136f30d..9caf65ac7e1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2003-09-22 Petur Runolfsson + + * include/bits/istream.tcc (basic_istream::read, + basic_istream::readsome, basic_istream::putback, + basic_istream::unget, operator>>(basic_istream, CharT)): + Avoid redundant setstate(failbit) calls when sentry::operator bool() + returns false. + 2003-09-22 Carlo Wood PR libstdc++/12365 diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 543d94d0f1d..e6677c523a4 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -798,8 +798,6 @@ namespace std __throw_exception_again; } } - else - this->setstate(ios_base::failbit); return *this; } @@ -834,8 +832,6 @@ namespace std __throw_exception_again; } } - else - this->setstate(ios_base::failbit); return _M_gcount; } @@ -868,8 +864,6 @@ namespace std __throw_exception_again; } } - else - this->setstate(ios_base::failbit); return *this; } @@ -902,8 +896,6 @@ namespace std __throw_exception_again; } } - else - this->setstate(ios_base::failbit); return *this; } @@ -1014,8 +1006,6 @@ namespace std __throw_exception_again; } } - else - __in.setstate(ios_base::failbit); return __in; }