Fix booleanize closes #35
parent
e32d7bb1b9
commit
8cae275bf4
|
@ -259,7 +259,7 @@ public:
|
||||||
|
|
||||||
bool hash_compare(const Variant& b) const;
|
bool hash_compare(const Variant& b) const;
|
||||||
|
|
||||||
bool booleanize(bool &valid) const;
|
bool booleanize() const;
|
||||||
|
|
||||||
~Variant();
|
~Variant();
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,7 @@ Variant &Variant::operator =(const Variant& v)
|
||||||
|
|
||||||
Variant::operator bool() const
|
Variant::operator bool() const
|
||||||
{
|
{
|
||||||
bool valid = false;
|
return booleanize();
|
||||||
bool result = booleanize(valid);
|
|
||||||
return valid && result;
|
|
||||||
}
|
}
|
||||||
Variant::operator signed int() const
|
Variant::operator signed int() const
|
||||||
{
|
{
|
||||||
|
@ -423,9 +421,9 @@ bool Variant::hash_compare(const Variant& b) const
|
||||||
return godot_variant_hash_compare(&_godot_variant, &b._godot_variant);
|
return godot_variant_hash_compare(&_godot_variant, &b._godot_variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Variant::booleanize(bool &valid) const
|
bool Variant::booleanize() const
|
||||||
{
|
{
|
||||||
return godot_variant_booleanize(&_godot_variant, &valid);
|
return godot_variant_booleanize(&_godot_variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::~Variant()
|
Variant::~Variant()
|
||||||
|
|
Loading…
Reference in New Issue