diff options
author | Paolo Carlini <pcarlini@unitus.it> | 2003-04-18 15:55:22 +0200 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-04-18 13:55:22 +0000 |
commit | 0b176c1af26f5a4a7eb9fa4d69f5851e47fde26a (patch) | |
tree | 1db6b55db6c5212e9bc439cdef2fb282dbf03525 /libstdc++-v3/include/bits/streambuf.tcc | |
parent | c553b7026a36d035a298064ea62e9035ba2b3edd (diff) | |
download | gcc-0b176c1af26f5a4a7eb9fa4d69f5851e47fde26a.zip gcc-0b176c1af26f5a4a7eb9fa4d69f5851e47fde26a.tar.gz gcc-0b176c1af26f5a4a7eb9fa4d69f5851e47fde26a.tar.bz2 |
According to 5.9 para 2 (second bullet) for pointers p...
2003-04-18 Paolo Carlini <pcarlini@unitus.it>
According to 5.9 para 2 (second bullet) for pointers p, q
pointing to the same type, with p == 0 and q == 0, (p < q)
is false.
* include/bits/fstream.tcc (close, overflow, _M_really_overflow,
seekoff): Remove redundant NULL pointer checks from tests
involving _M_out_* and _M_in_*, const qualify bool variables.
(showmanyc, pbackfail, _M_convert_to_external, imbue): Const
qualify bool variables.
* include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc, sputc):
Remove redundant NULL pointer checks from tests involving
_M_out_* and _M_in_*, const qualify bool variables.
* include/std/std_fstream.h (sync): Likewise.
(_M_is_indeterminate): Const qualify bool variables.
* include/std/std_streambuf.h (sgetc, uflow): Remove redundant
NULL pointer checks from tests involving _M_out_* and _M_in_*,
const qualify bool variables.
(_M_in_cur_move, _M_out_cur_move, uflow): Const qualify bool
variables.
From-SVN: r65783
Diffstat (limited to 'libstdc++-v3/include/bits/streambuf.tcc')
-rw-r--r-- | libstdc++-v3/include/bits/streambuf.tcc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc index 75ef518..09dd14c 100644 --- a/libstdc++-v3/include/bits/streambuf.tcc +++ b/libstdc++-v3/include/bits/streambuf.tcc @@ -49,7 +49,7 @@ namespace std sbumpc() { int_type __ret; - if (_M_in_cur && _M_in_cur < _M_in_end) + if (_M_in_cur < _M_in_end) { char_type __c = *(this->gptr()); _M_in_cur_move(1); @@ -66,7 +66,7 @@ namespace std sputbackc(char_type __c) { int_type __ret; - bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur; + const bool __testpos = _M_in_beg < _M_in_cur; if (!__testpos || !traits_type::eq(__c, this->gptr()[-1])) __ret = this->pbackfail(traits_type::to_int_type(__c)); else @@ -83,7 +83,7 @@ namespace std sungetc() { int_type __ret; - if (_M_in_cur && _M_in_beg < _M_in_cur) + if (_M_in_beg < _M_in_cur) { _M_in_cur_move(-1); __ret = traits_type::to_int_type(*_M_in_cur); @@ -99,7 +99,7 @@ namespace std sputc(char_type __c) { int_type __ret; - if (_M_out_cur && _M_out_cur < _M_out_end) + if (_M_out_cur < _M_out_end) { *_M_out_cur = __c; _M_out_cur_move(1); |