Merge pull request #42012 from vnen/variant-fix-vectori-mult

Fix Vector{2,3}i casting on Variant multiplication with numbers
This commit is contained in:
Rémi Verschelde 2020-09-13 08:13:34 +02:00 committed by GitHub
commit 43725691b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,9 +256,9 @@ bool Variant::booleanize() const {
if (p_b.type == VECTOR3) \ if (p_b.type == VECTOR3) \
_RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \ _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \
if (p_b.type == VECTOR2I) \ if (p_b.type == VECTOR2I) \
_RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \ _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2i *>(p_b._data._mem)); \
if (p_b.type == VECTOR3I) \ if (p_b.type == VECTOR3I) \
_RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \ _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3i *>(p_b._data._mem)); \
\ \
_RETURN_FAIL \ _RETURN_FAIL \
} }