Fix booleanize closes #35

pull/36/head
Ramesh Ravone 2017-09-22 11:33:54 +05:30
parent e32d7bb1b9
commit 8cae275bf4
No known key found for this signature in database
GPG Key ID: 90B471D9AC10312A
2 changed files with 4 additions and 6 deletions

View File

@ -259,7 +259,7 @@ public:
bool hash_compare(const Variant& b) const;
bool booleanize(bool &valid) const;
bool booleanize() const;
~Variant();

View File

@ -199,9 +199,7 @@ Variant &Variant::operator =(const Variant& v)
Variant::operator bool() const
{
bool valid = false;
bool result = booleanize(valid);
return valid && result;
return booleanize();
}
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);
}
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()