Refactored variant constructor logic

This commit is contained in:
reduz
2020-11-09 00:19:09 -03:00
parent 593e35346a
commit 221a2a1742
33 changed files with 1369 additions and 571 deletions

View File

@ -95,7 +95,7 @@ void PropertySelector::_update_search() {
} else if (type != Variant::NIL) {
Variant v;
Callable::CallError ce;
v = Variant::construct(type, nullptr, 0, ce);
Variant::construct(type, v, nullptr, 0, ce);
v.get_property_list(&props);
} else {
@ -200,7 +200,7 @@ void PropertySelector::_update_search() {
if (type != Variant::NIL) {
Variant v;
Callable::CallError ce;
v = Variant::construct(type, nullptr, 0, ce);
Variant::construct(type, v, nullptr, 0, ce);
v.get_method_list(&methods);
} else {
Object *obj = ObjectDB::get_instance(script);