Commit eacf72d3 by Nathan Myers Committed by Paolo Carlini

2004-11-24 Nathan Myers <ncm@cantrip.org>

	* include/bits/streambuf_iterator.h
	(istreambuf_iterator<>::operator++(), operator++(int)): Don't
	check unnecessarily the return value of _M_sbuf->sbumpc().

From-SVN: r91176
parent bada2eb8
2004-11-24 Nathan Myers <ncm@cantrip.org>
* include/bits/streambuf_iterator.h
(istreambuf_iterator<>::operator++(), operator++(int)): Don't
check unnecessarily the return value of _M_sbuf->sbumpc().
2004-11-24 Benjamin Kosnik <bkoz@redhat.com> 2004-11-24 Benjamin Kosnik <bkoz@redhat.com>
* include/Makefile.am (tr1_headers): Add utility, functional. * include/Makefile.am (tr1_headers): Add utility, functional.
......
...@@ -110,11 +110,11 @@ namespace std ...@@ -110,11 +110,11 @@ namespace std
__glibcxx_requires_cond(!_M_at_eof(), __glibcxx_requires_cond(!_M_at_eof(),
_M_message(__gnu_debug::__msg_inc_istreambuf) _M_message(__gnu_debug::__msg_inc_istreambuf)
._M_iterator(*this)); ._M_iterator(*this));
const int_type __eof = traits_type::eof(); if (_M_sbuf)
if (_M_sbuf && traits_type::eq_int_type(_M_sbuf->sbumpc(), __eof)) {
_M_sbuf = 0; _M_sbuf->sbumpc();
else _M_c = traits_type::eof();
_M_c = __eof; }
return *this; return *this;
} }
...@@ -126,14 +126,12 @@ namespace std ...@@ -126,14 +126,12 @@ namespace std
_M_message(__gnu_debug::__msg_inc_istreambuf) _M_message(__gnu_debug::__msg_inc_istreambuf)
._M_iterator(*this)); ._M_iterator(*this));
const int_type __eof = traits_type::eof();
istreambuf_iterator __old = *this; istreambuf_iterator __old = *this;
if (_M_sbuf if (_M_sbuf)
&& traits_type::eq_int_type((__old._M_c = _M_sbuf->sbumpc()), {
__eof)) __old._M_c = _M_sbuf->sbumpc();
_M_sbuf = 0; _M_c = traits_type::eof();
else }
_M_c = __eof;
return __old; return __old;
} }
......
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