Commit 89ec0c4b by Petur Runolfsson Committed by Paolo Carlini

istream.tcc (basic_istream::read, [...]): Avoid redundant setstate(failbit)…

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
parent 0ba529ca
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment