Merge pull request #61658 from vnen/hash-compare-stringname

This commit is contained in:
Rémi Verschelde 2022-06-03 12:40:48 +02:00 committed by GitHub
commit 8f77ee6a7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3102,6 +3102,10 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const
return *reinterpret_cast<const String *>(_data._mem) == *reinterpret_cast<const String *>(p_variant._data._mem);
} break;
case STRING_NAME: {
return *reinterpret_cast<const StringName *>(_data._mem) == *reinterpret_cast<const StringName *>(p_variant._data._mem);
} break;
case VECTOR2: {
const Vector2 *l = reinterpret_cast<const Vector2 *>(_data._mem);
const Vector2 *r = reinterpret_cast<const Vector2 *>(p_variant._data._mem);