Merge pull request #69699 from aaronfranke/fix-variant-sname-inv

Fix Variant StringName `is_zero` being inverted
This commit is contained in:
Rémi Verschelde 2022-12-07 13:24:49 +01:00
commit 5c635e8f24
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -940,7 +940,7 @@ bool Variant::is_zero() const {
return reinterpret_cast<const Signal *>(_data._mem)->is_null();
}
case STRING_NAME: {
return *reinterpret_cast<const StringName *>(_data._mem) != StringName();
return *reinterpret_cast<const StringName *>(_data._mem) == StringName();
}
case NODE_PATH: {
return reinterpret_cast<const NodePath *>(_data._mem)->is_empty();