OSDN Git Service

2007-01-25 Nathan Myers <ncm@cantrip.org>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Jan 2007 13:08:51 +0000 (13:08 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Jan 2007 13:08:51 +0000 (13:08 +0000)
* include/bits/streambuf_iterator.h (istreambuf_iterator<>::equal):
Simplify.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121170 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/streambuf_iterator.h

index bcc3056..24034fa 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-25  Nathan Myers  <ncm@cantrip.org>
+
+       * include/bits/streambuf_iterator.h (istreambuf_iterator<>::equal):
+       Simplify.
+
 2007-01-24   Steve LoBasso <slobasso@yahoo.com>
             Paolo Carlini  <pcarlini@suse.de>
 
index c743bb3..26cc00f 100644 (file)
@@ -157,11 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       /// Return true both iterators are end or both are not end.
       bool
       equal(const istreambuf_iterator& __b) const
-      {
-       const bool __thiseof = _M_at_eof();
-       const bool __beof = __b._M_at_eof();
-       return ((__thiseof && __beof) || (!__thiseof && !__beof));
-      }
+      { return _M_at_eof() == __b._M_at_eof(); }
 
     private:
       int_type