mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Refactored variant constructor logic
This commit is contained in:
parent
593e35346a
commit
221a2a1742
33 changed files with 1369 additions and 571 deletions
|
@ -84,10 +84,10 @@ void VisualScriptNode::validate_input_default_values() {
|
|||
Callable::CallError ce;
|
||||
Variant existing = default_input_values[i];
|
||||
const Variant *existingp = &existing;
|
||||
default_input_values[i] = Variant::construct(expected, &existingp, 1, ce, false);
|
||||
Variant::construct(expected, default_input_values[i], &existingp, 1, ce);
|
||||
if (ce.error != Callable::CallError::CALL_OK) {
|
||||
//could not convert? force..
|
||||
default_input_values[i] = Variant::construct(expected, nullptr, 0, ce, false);
|
||||
Variant::construct(expected, default_input_values[i], nullptr, 0, ce);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue