From: Paolo Carlini Date: Thu, 1 May 2003 08:41:59 +0000 (+0200) Subject: stdio_filebuf.h (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), [...... X-Git-Tag: releases/gcc-3.4.0~6907 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8544261c532e1f7e39872d6cd7ff683a708e5def;p=thirdparty%2Fgcc.git stdio_filebuf.h (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), [...]): Shorten a bit (-10 lines) by factoring out some code. 2003-05-01 Paolo Carlini * 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. From-SVN: r66320 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 962ddb0b32ff..70fafd0f7598 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2003-05-01 Paolo Carlini + + * 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 * 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 c2cfa2c143f3..90031963631f 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(); } }