aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Skowroński <skowri@gmail.com>2016-01-28 00:56:18 +0100
committerMateusz Skowroński <skowri@gmail.com>2016-01-28 00:56:18 +0100
commit047faf7b0ee94422e993120af6225c9cd0dc356a (patch)
tree5345cadd24c450acb3a105e68b5e11af7d76cb3e
parent9e77ae5e4149cb8dbb8ad4461d1b9ee54a0a1e8e (diff)
Fix GCC 5 warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
-rw-r--r--tests/libminimal/minbool.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libminimal/minbool.h b/tests/libminimal/minbool.h
index 4901eb0..7dfa638 100644
--- a/tests/libminimal/minbool.h
+++ b/tests/libminimal/minbool.h
@@ -39,12 +39,12 @@ private:
bool m_value;
};
-inline bool operator==(MinBool b1, bool b2) { return !b1 == !b2; }
-inline bool operator==(bool b1, MinBool b2) { return !b1 == !b2; }
-inline bool operator==(MinBool b1, MinBool b2) { return !b1 == !b2; }
-inline bool operator!=(MinBool b1, bool b2) { return !b1 != !b2; }
-inline bool operator!=(bool b1, MinBool b2) { return !b1 != !b2; }
-inline bool operator!=(MinBool b1, MinBool b2) { return !b1 != !b2; }
+inline bool operator==(MinBool b1, bool b2) { return (!b1) == !b2; }
+inline bool operator==(bool b1, MinBool b2) { return (!b1) == !b2; }
+inline bool operator==(MinBool b1, MinBool b2) { return (!b1) == !b2; }
+inline bool operator!=(MinBool b1, bool b2) { return (!b1) != !b2; }
+inline bool operator!=(bool b1, MinBool b2) { return (!b1) != !b2; }
+inline bool operator!=(MinBool b1, MinBool b2) { return (!b1) != !b2; }
class LIBMINIMAL_API MinBoolUser
{