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, trivial] Simplify a bit streambuf::uflow


Hi,

since probably we are going to use it much more than before,
let's make sure it's as simple as the standard prescribes ;)

Tested x86-linux, committed.

Paolo.

//////////
2003-06-29  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (uflow): According to
	27.5.2.4.3,p16, don't check gptr() < egptr().
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-06-25 20:27:53.000000000 +0200
+++ libstdc++-v3/include/std/std_streambuf.h	2003-06-28 23:21:29.000000000 +0200
@@ -692,7 +692,7 @@
 	int_type __ret = traits_type::eof();
 	const bool __testeof = traits_type::eq_int_type(this->underflow(), 
 							__ret);
-	if (!__testeof && this->gptr() < this->egptr())
+	if (!__testeof)
 	  {
 	    __ret = traits_type::to_int_type(*this->gptr());
 	    this->gbump(1);

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