summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-30 13:47:35 +0200
committerGitHub <noreply@github.com>2022-03-30 13:47:35 +0200
commit03c58954c0ae3780049085cd25c18bfaaf387fbc (patch)
treeee5461ffbbbe35034e611f00d4462f2361e13b89 /scene/gui
parent3f78375ccee7053aaa6f1cb235b63ccd150ddccb (diff)
parent63f7f44ccb65015c1936a84d256165cab1251814 (diff)
Merge pull request #58436 from piiertho/feature/typed-vararg-method-bind
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tree.cpp7
-rw-r--r--scene/gui/tree.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index ff8d2b88b1..ccd24ed2cf 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1162,24 +1162,23 @@ Size2 TreeItem::get_minimum_size(int p_column) {
return cell.cached_minimum_size;
}
-Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+void TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
- return Variant();
+ return;
}
if (p_args[0]->get_type() != Variant::STRING && p_args[0]->get_type() != Variant::STRING_NAME) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING_NAME;
- return Variant();
+ return;
}
StringName method = *p_args[0];
call_recursive(method, &p_args[1], p_argcount - 1, r_error);
- return Variant();
}
void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index dc786de6dc..04d4b9b935 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -189,7 +189,7 @@ protected:
return d;
}
- Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ void _call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
public:
/* cell mode */