diff options
author | Paolo Carlini <pcarlini@unitus.it> | 2003-06-02 20:24:30 +0200 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-06-02 18:24:30 +0000 |
commit | 62929dd980996e79b9e4668b31c4a7fa48b0bef7 (patch) | |
tree | 21fc7c60a064dff0af3e378b31585c5d283ab12b | |
parent | cc9c608f08f26dada89538d1d2f64c0484369aa7 (diff) | |
download | gcc-62929dd980996e79b9e4668b31c4a7fa48b0bef7.zip gcc-62929dd980996e79b9e4668b31c4a7fa48b0bef7.tar.gz gcc-62929dd980996e79b9e4668b31c4a7fa48b0bef7.tar.bz2 |
sstream.tcc (pbackfail): Minor clean up and reformatting, consistent with basic_filebuf::pbackfail.
2003-06-02 Paolo Carlini <pcarlini@unitus.it>
* include/bits/sstream.tcc (pbackfail): Minor clean up and
reformatting, consistent with basic_filebuf::pbackfail.
From-SVN: r67342
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/sstream.tcc | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 035215f..7e204bc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-06-02 Paolo Carlini <pcarlini@unitus.it> + + * include/bits/sstream.tcc (pbackfail): Minor clean up and + reformatting, consistent with basic_filebuf::pbackfail. + 2003-06-02 Richard Kreckel <Richard.Kreckel@GiNaC.DE> PR libstdc++/11062 diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index b506d18..49a5aa0 100644 --- a/libstdc++-v3/include/bits/sstream.tcc +++ b/libstdc++-v3/include/bits/sstream.tcc @@ -47,18 +47,16 @@ namespace std pbackfail(int_type __c) { int_type __ret = traits_type::eof(); - const bool __testeof = traits_type::eq_int_type(__c, - traits_type::eof()); - const bool __testpos = this->_M_in_beg < this->_M_in_cur; + const bool __testeof = traits_type::eq_int_type(__c, __ret); - // Try to put back __c into input sequence in one of three ways. - // Order these tests done in is unspecified by the standard. - if (__testpos) + if (this->_M_in_beg < this->_M_in_cur) { const bool __testeq = traits_type::eq(traits_type::to_char_type(__c), this->_M_in_cur[-1]); - --this->_M_in_cur; + + // Try to put back __c into input sequence in one of three ways. + // Order these tests done in is unspecified by the standard. if (!__testeof && __testeq) __ret = __c; else if (__testeof) |