This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Simplify basic_streambuf::setg() and setp()


Hi,

tested x86-linux, approved privately by Benjamin.

Paolo.

//////////
2003-05-08  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (setg, setp): Don't touch _M_mode.
diff -urN libstdc++-v3-orig/include/std/std_streambuf.h libstdc++-v3/include/std/std_streambuf.h
--- libstdc++-v3-orig/include/std/std_streambuf.h	2003-04-29 01:51:36.000000000 +0200
+++ libstdc++-v3/include/std/std_streambuf.h	2003-05-08 05:54:21.000000000 +0200
@@ -508,8 +508,6 @@
 	_M_in_beg = __gbeg;
 	_M_in_cur = __gnext;
 	_M_in_end = __gend;
-	if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend)
-	  _M_mode = _M_mode | ios_base::in;
       }
 
       // [27.5.2.3.2] put area access
@@ -555,8 +553,6 @@
       { 
 	_M_out_beg = _M_out_cur = _M_out_lim = __pbeg; 
 	_M_out_end = __pend;
-	if (!(_M_mode & ios_base::out) && __pbeg && __pend)
-	  _M_mode = _M_mode | ios_base::out;
       }
 
       // [27.5.2.4] virtual functions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]