Skip to content

Commit

Permalink
Merge pull request godotengine#17486 from bojidar-bg/x-fix-clang-nega…
Browse files Browse the repository at this point in the history
…tion-warn

Fix a potential bug hinted by clang
  • Loading branch information
akien-mga authored Mar 13, 2018
2 parents 9b1f03f + 4d81e8a commit b64d4e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/variant_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
};
Expand Down Expand Up @@ -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 \
};
Expand All @@ -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 \
};
Expand Down Expand Up @@ -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 \
}
Expand Down

0 comments on commit b64d4e3

Please sign in to comment.