From ab7d8187c77be1284ae30d7f2b7d1c75f4a7e3b4 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 10 Jun 2003 22:00:43 +0000 Subject: 2003-06-10 Paolo Carlini * include/bits/fstream.tcc (close): Clean up a bit. * include/bits/streambuf.tcc (sbumpc): Clean up a bit. * include/std/std_fstream.h (_M_destroy_pback): _M_pback_cur_save - the saved _M_in_cur, that is - cannot be null. (sync): Constify a variable. * include/std/std_streambuf.h: Tweak a comment. (in_avail): Constify a variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67738 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/std/std_fstream.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libstdc++-v3/include/std/std_fstream.h') diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h index fe72e9d9b18..7cc0dbd8e1f 100644 --- a/libstdc++-v3/include/std/std_fstream.h +++ b/libstdc++-v3/include/std/std_fstream.h @@ -191,8 +191,7 @@ namespace std if (_M_pback_init) { // Length _M_in_cur moved in the pback buffer. - if (_M_pback_cur_save) - _M_pback_cur_save += this->_M_in_cur != this->_M_in_beg; + _M_pback_cur_save += this->_M_in_cur != this->_M_in_beg; this->setg(this->_M_buf, _M_pback_cur_save, _M_pback_end_save); _M_pback_init = false; } @@ -373,7 +372,7 @@ namespace std if (__testput) { // Need to restore current position after the write. - off_type __off = this->_M_out_cur - this->_M_out_lim; + const off_type __off = this->_M_out_cur - this->_M_out_lim; // _M_file.sync() will be called within. if (traits_type::eq_int_type(this->overflow(), traits_type::eof())) -- cgit v1.2.3