This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[Patch] Simplify a bit basic_filebuf::_M_underflow



while (1) { read_again; understanding++; cut; }

Tested x86-linux, ok?

Paolo.

/////////


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

	* src/fstream.cc
	(basic_filebuf<char/wchar_t>::_M_underflow): _M_set_determinate()
	automatically sets, if appropriate, _M_out_cur == _M_in_cur.
diff -urN libstdc++-v3-1/src/fstream.cc libstdc++-v3/src/fstream.cc
--- libstdc++-v3-1/src/fstream.cc	2003-04-28 06:54:54.000000000 +0200
+++ libstdc++-v3/src/fstream.cc	2003-05-03 18:34:06.000000000 +0200
@@ -86,8 +86,6 @@
 	      if (0 < __ilen)
 		{
 		  _M_set_determinate(__ilen);
-		  if (__testout)
-		    _M_out_cur = _M_in_cur;
 		  __ret = traits_type::to_int_type(*_M_in_cur);
 		  if (__bump)
 		    _M_move_in_cur(1);
@@ -191,8 +189,6 @@
 	      if (0 < __ilen)
 		{
 		  _M_set_determinate(__ilen);
-		  if (__testout)
-		    _M_out_cur = _M_in_cur;
 		  __ret = traits_type::to_int_type(*_M_in_cur);
 		  if (__bump)
 		    _M_move_in_cur(1);

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