diff --git a/src/script/nodes/functions/function_terminator.cpp b/src/script/nodes/functions/function_terminator.cpp index 38bf6d00..b6662ae6 100644 --- a/src/script/nodes/functions/function_terminator.cpp +++ b/src/script/nodes/functions/function_terminator.cpp @@ -73,10 +73,7 @@ bool OScriptNodeFunctionTerminator::_get(const StringName& p_name, Variant& r_va else if (p_name.match("argument_count")) { Ref function = get_function(); - if (function.is_valid()) - r_value = function->get_argument_count(); - else - r_value = 0; + r_value = function.is_valid() ? static_cast(function->get_argument_count()) : 0; return true; } else if (p_name.begins_with("argument_")) diff --git a/src/script/nodes/signals/emit_signal.cpp b/src/script/nodes/signals/emit_signal.cpp index 51be97dd..2f9eadc7 100644 --- a/src/script/nodes/signals/emit_signal.cpp +++ b/src/script/nodes/signals/emit_signal.cpp @@ -127,10 +127,7 @@ bool OScriptNodeEmitSignal::_get(const StringName& p_name, Variant& r_value) con } else if (p_name.match("argument_count")) { - if (_signal.is_valid()) - r_value = _signal->get_argument_count(); - else - r_value = 0; + r_value = _signal.is_valid() ? static_cast(_signal->get_argument_count()) : 0; return true; } else if (p_name.begins_with("argument_")) diff --git a/src/script/signals.cpp b/src/script/signals.cpp index 9a1c20b0..3ff1dd29 100644 --- a/src/script/signals.cpp +++ b/src/script/signals.cpp @@ -54,7 +54,7 @@ bool OScriptSignal::_get(const StringName &p_name, Variant &r_value) } else if (p_name.match("argument_count")) { - r_value = _method.arguments.size(); + r_value = static_cast(_method.arguments.size()); return true; } else if (p_name.begins_with("argument_")) @@ -93,7 +93,7 @@ bool OScriptSignal::_set(const StringName &p_name, const Variant &p_value) } else if (p_name.match("argument_count")) { - if (resize_argument_list(p_value)) + if (resize_argument_list(static_cast(p_value))) notify_property_list_changed(); return true; }