diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-10 22:00:43 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-10 22:00:43 +0000 |
| commit | ab7d8187c77be1284ae30d7f2b7d1c75f4a7e3b4 (patch) | |
| tree | 5b58dfe6d9667340a91ac1704b87da6a4ba7cb96 /libstdc++-v3/include/std/std_fstream.h | |
| parent | eba9ef4c75152b71fada3544550f85ee864053d2 (diff) | |
| download | ppe42-gcc-ab7d8187c77be1284ae30d7f2b7d1c75f4a7e3b4.tar.gz ppe42-gcc-ab7d8187c77be1284ae30d7f2b7d1c75f4a7e3b4.zip | |
2003-06-10 Paolo Carlini <pcarlini@unitus.it>
* 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
Diffstat (limited to 'libstdc++-v3/include/std/std_fstream.h')
| -rw-r--r-- | libstdc++-v3/include/std/std_fstream.h | 5 |
1 files changed, 2 insertions, 3 deletions
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())) |

