summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-09 21:19:25 +0200
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-13 17:10:28 +0200
commit4d81e8afe61635f7542342ea3af928afcad41197 (patch)
tree8b1445654e582ac0434a9ff993f4db935f7090c1 /core
parenteceba5aa6a36521c878cf976845123e820d27161 (diff)
Fix a potential bug hinted by clang
Diffstat (limited to 'core')
-rw-r--r--core/variant_op.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 97b469861c..842f5f0af6 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -177,7 +177,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- if (p_b.type == NIL) _RETURN(!p_b.type m_op NIL); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -252,7 +252,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
- if (p_b.type == NIL) _RETURN(!p_b.type m_op NIL); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -278,7 +278,7 @@ bool Variant::booleanize() const {
if (p_b.type == m_name) \
_RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const m_type *>(p_b._data._mem)); \
if (p_b.type == NIL) \
- _RETURN(!p_b.type m_op NIL); \
+ _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -323,7 +323,7 @@ bool Variant::booleanize() const {
if (p_b.type == m_name) \
_RETURN(*p_a._data.m_sub m_op *p_b._data.m_sub); \
if (p_b.type == NIL) \
- _RETURN(!p_b.type m_op NIL); \
+ _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
}