Added missing Variant conversion and zero cases.

This commit is contained in:
Relintai 2023-08-15 10:23:41 +02:00
parent ebbcbe1439
commit c80ee8d7bf

View File

@ -739,6 +739,8 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
POOL_VECTOR2I_ARRAY,
POOL_VECTOR3_ARRAY,
POOL_VECTOR3I_ARRAY,
POOL_VECTOR4_ARRAY,
POOL_VECTOR4I_ARRAY,
NIL
};
@ -1307,6 +1309,9 @@ void Variant::zero() {
case COLOR:
*reinterpret_cast<Color *>(this->_data._mem) = Color();
break;
case PROJECTION:
*reinterpret_cast<Projection *>(this->_data._mem) = Projection();
break;
default:
this->clear();
break;