[2/4] iterator: Add missing parentheses
diff mbox series

Message ID 20190803015558.4143-2-rosenp@gmail.com
State New
Headers show
Series
  • Untitled series #123081
Related show

Commit Message

Rosen Penev Aug. 3, 2019, 1:55 a.m. UTC
Clang warns:

warning: '&&' within '||' [-Wlogical-op-parentheses]
return sbuf == b.sbuf || is_eof() && b.is_eof();

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 include/iterator | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/include/iterator b/include/iterator
index d65f467..3348d85 100644
--- a/include/iterator
+++ b/include/iterator
@@ -164,7 +164,7 @@  namespace std{
 		}
 
 		bool equal(const istreambuf_iterator& b) const{
-			return sbuf == b.sbuf || is_eof() && b.is_eof();
+			return sbuf == b.sbuf || (is_eof() && b.is_eof());
 		}
 	private:
 		streambuf_type* sbuf;