diff --git a/include/core/Variant.hpp b/include/core/Variant.hpp index 6d9b1a71..8910df6b 100644 --- a/include/core/Variant.hpp +++ b/include/core/Variant.hpp @@ -259,7 +259,7 @@ public: bool hash_compare(const Variant& b) const; - bool booleanize(bool &valid) const; + bool booleanize() const; ~Variant(); diff --git a/src/core/Variant.cpp b/src/core/Variant.cpp index fa72b669..de500b09 100644 --- a/src/core/Variant.cpp +++ b/src/core/Variant.cpp @@ -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()