[PATCH] Cleanup in istream.tcc

Gabriel Dos Reis gdr@integrable-solutions.net
Mon Sep 22 10:28:00 GMT 2003


Pétur Runólfsson <peturr02@ru.is> writes:

| Several functions in istream.tcc use the construct
| 
| sentry __cerb(*this, true);
| if (__cerb) 
|   {
|     // ...
|   }
| else
|   this->setstate(ios_base::failbit);
| 
| The call to setstate is redundant since sentry::operator bool() only
| returns false if sentry::sentry() has already set failbit.
| 
| Tested on i686-pc-linux-gnu.

It is OK.

-- Gaby



More information about the Libstdc++ mailing list