diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-01 08:41:59 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-01 08:41:59 +0000 |
| commit | 044b24bea479a91d677fc8cb82cf52415322190e (patch) | |
| tree | 4db80e1088a7187b9fde70e7f6af682e9c9694a0 | |
| parent | 2c0181568efbca078f1aab06271f771d2a4538b4 (diff) | |
| download | ppe42-gcc-044b24bea479a91d677fc8cb82cf52415322190e.tar.gz ppe42-gcc-044b24bea479a91d677fc8cb82cf52415322190e.zip | |
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/ext/stdio_filebuf.h
(stdio_filebuf(int, std::ios_base::openmode, bool, size_t),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t)):
Shorten a bit (-10 lines) by factoring out some code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66320 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/stdio_filebuf.h | 26 |
2 files changed, 15 insertions, 18 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 962ddb0b32f..70fafd0f759 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2003-05-01 Paolo Carlini <pcarlini@unitus.it> + + * include/ext/stdio_filebuf.h + (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), + stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t)): + Shorten a bit (-10 lines) by factoring out some code. + 2003-04-30 Phil Edwards <pme@gcc.gnu.org> * acinclude.m4: Add bit missing from previous patch. diff --git a/libstdc++-v3/include/ext/stdio_filebuf.h b/libstdc++-v3/include/ext/stdio_filebuf.h index c2cfa2c143f..90031963631 100644 --- a/libstdc++-v3/include/ext/stdio_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_filebuf.h @@ -124,17 +124,12 @@ namespace __gnu_cxx if (this->is_open()) { this->_M_mode = __mode; + this->_M_buf_size = __size; if (__size > 0 && __size < 4) - { - // Specify not to use an allocated buffer. - this->_M_buf = _M_unbuf; - this->_M_buf_size = __size; - } + // Specify not to use an allocated buffer. + this->_M_buf = _M_unbuf; else - { - this->_M_buf_size = __size; - _M_allocate_internal_buffer(); - } + _M_allocate_internal_buffer(); _M_set_indeterminate(); } } @@ -148,17 +143,12 @@ namespace __gnu_cxx if (this->is_open()) { this->_M_mode = __mode; + this->_M_buf_size = __size; if (__size > 0 && __size < 4) - { - // Specify not to use an allocated buffer. - this->_M_buf = _M_unbuf; - this->_M_buf_size = __size; - } + // Specify not to use an allocated buffer. + this->_M_buf = _M_unbuf; else - { - this->_M_buf_size = __size; - _M_allocate_internal_buffer(); - } + _M_allocate_internal_buffer(); _M_set_indeterminate(); } } |

