stdio_filebuf.h (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), [......
authorPaolo Carlini <pcarlini@unitus.it>
Thu, 1 May 2003 08:41:59 +0000 (10:41 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 1 May 2003 08:41:59 +0000 (08:41 +0000)
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.

From-SVN: r66320

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/stdio_filebuf.h

index 962ddb0b32ff825aded642c6a54cf48a28b96f2d..70fafd0f7598b661a8c9e0d5ff6fb3f57543f3d5 100644 (file)
@@ -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.
index c2cfa2c143f3aa7454c728b29af0f628a555734f..90031963631fa4a55509aa84c7b6162d32b37b64 100644 (file)
@@ -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();
        }
     }