mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-02 16:23:56 +08:00
istream.tcc (basic_istream::read, [...]): Avoid redundant setstate(failbit) calls when sentry::operator bool() returns false.
2003-09-22 Petur Runolfsson <peturr02@ru.is> * 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
This commit is contained in:
parent
0ba529cab4
commit
89ec0c4ba6
@ -1,3 +1,11 @@
|
||||
2003-09-22 Petur Runolfsson <peturr02@ru.is>
|
||||
|
||||
* 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 <carlo@alinoe.com>
|
||||
|
||||
PR libstdc++/12365
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user