From: Paolo Carlini Date: Fri, 21 May 2004 17:16:21 +0000 (+0000) Subject: istream.tcc (ignore): Remove redundant line. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32da620821cb3008eab38080a9292599f1ee3d58;p=gcc.git istream.tcc (ignore): Remove redundant line. 2004-05-21 Paolo Carlini * include/bits/istream.tcc (ignore): Remove redundant line. (readsome): Tidy, closely following 27.6.1.3, p30. From-SVN: r82103 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1baf1dede9b..fe58a1ea241 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2004-05-21 Paolo Carlini + + * include/bits/istream.tcc (ignore): Remove redundant line. + (readsome): Tidy, closely following 27.6.1.3, p30. + 2004-05-20 Paolo Carlini * include/bits/istream.tcc (operator>>(basic_istream<>&, diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 5469005a67f..b9dd0b1828e 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -659,7 +659,6 @@ namespace std __streambuf_type* __sb = this->rdbuf(); int_type __c; - __n = std::min(__n, numeric_limits::max()); while (_M_gcount < __n && !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof)) { @@ -740,14 +739,10 @@ namespace std try { // Cannot compare int_type with streamsize generically. - streamsize __num = this->rdbuf()->in_avail(); - if (__num >= 0) - { - __num = std::min(__num, __n); - if (__num) - _M_gcount = this->rdbuf()->sgetn(__s, __num); - } - else + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) __err |= ios_base::eofbit; } catch(...)