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] Change basic_stringbuf::underflow to single return


Hi,

so, now that the discussion has settled, I have noticed
this long standing inconstistency.

Ok?

Paolo.

////////
2003-04-29  Paolo Carlini  <pcarlini at unitus dot it>

	* include/std/std_sstream.h (underflow): Change to single return.
diff -prN libstdc++-v3-orig/include/std/std_sstream.h libstdc++-v3/include/std/std_sstream.h
*** libstdc++-v3-orig/include/std/std_sstream.h	Tue Apr 29 01:11:27 2003
--- libstdc++-v3/include/std/std_sstream.h	Tue Apr 29 19:30:56 2003
*************** namespace std
*** 190,199 ****
        virtual int_type
        underflow()
        {
  	if (this->_M_in_cur < this->_M_in_end)
! 	  return traits_type::to_int_type(*this->_M_in_cur);
  	else
! 	  return traits_type::eof();
        }
  
        // [documentation is inherited]
--- 190,201 ----
        virtual int_type
        underflow()
        {
+ 	int_type __ret;
  	if (this->_M_in_cur < this->_M_in_end)
! 	  __ret = traits_type::to_int_type(*this->_M_in_cur);
  	else
! 	  __ret = traits_type::eof();
! 	return __ret;
        }
  
        // [documentation is inherited]

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