Skip to content

Commit

Permalink
GH-43 Fix more AppleClang ambiguity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Dec 30, 2023
1 parent 0624dce commit 43aa43e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/script/nodes/functions/function_terminator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ bool OScriptNodeFunctionTerminator::_get(const StringName& p_name, Variant& r_va
else if (p_name.match("argument_count"))
{
Ref<OScriptFunction> function = get_function();
if (function.is_valid())
r_value = function->get_argument_count();
else
r_value = 0;
r_value = function.is_valid() ? static_cast<int64_t>(function->get_argument_count()) : 0;
return true;
}
else if (p_name.begins_with("argument_"))
Expand Down
5 changes: 1 addition & 4 deletions src/script/nodes/signals/emit_signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(_signal->get_argument_count()) : 0;
return true;
}
else if (p_name.begins_with("argument_"))
Expand Down
4 changes: 2 additions & 2 deletions src/script/signals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(_method.arguments.size());
return true;
}
else if (p_name.begins_with("argument_"))
Expand Down Expand Up @@ -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<int64_t>(p_value)))
notify_property_list_changed();
return true;
}
Expand Down

0 comments on commit 43aa43e

Please sign in to comment.