Commit 32da6208 by Paolo Carlini Committed by Paolo Carlini

istream.tcc (ignore): Remove redundant line.

2004-05-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (ignore): Remove redundant line.
	(readsome): Tidy, closely following 27.6.1.3, p30.

From-SVN: r82103
parent b953ebd6
2004-05-21 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (ignore): Remove redundant line.
(readsome): Tidy, closely following 27.6.1.3, p30.
2004-05-20 Paolo Carlini <pcarlini@suse.de> 2004-05-20 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (operator>>(basic_istream<>&, * include/bits/istream.tcc (operator>>(basic_istream<>&,
......
...@@ -659,7 +659,6 @@ namespace std ...@@ -659,7 +659,6 @@ namespace std
__streambuf_type* __sb = this->rdbuf(); __streambuf_type* __sb = this->rdbuf();
int_type __c; int_type __c;
__n = std::min(__n, numeric_limits<streamsize>::max());
while (_M_gcount < __n while (_M_gcount < __n
&& !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof)) && !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof))
{ {
...@@ -740,14 +739,10 @@ namespace std ...@@ -740,14 +739,10 @@ namespace std
try try
{ {
// Cannot compare int_type with streamsize generically. // Cannot compare int_type with streamsize generically.
streamsize __num = this->rdbuf()->in_avail(); const streamsize __num = this->rdbuf()->in_avail();
if (__num >= 0) if (__num > 0)
{ _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
__num = std::min(__num, __n); else if (__num == -1)
if (__num)
_M_gcount = this->rdbuf()->sgetn(__s, __num);
}
else
__err |= ios_base::eofbit; __err |= ios_base::eofbit;
} }
catch(...) catch(...)
......
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