summaryrefslogtreecommitdiff
path: root/core/object/object.h
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2023-01-25 03:51:32 +0100
committerRaul Santos <raulsntos@gmail.com>2023-01-26 15:51:34 +0100
commitcac7a784d6423873acf3d356b99eea903ddc9633 (patch)
tree0f182ccadede22ae27239f520d967b03c97b6925 /core/object/object.h
parent9de0c73e4529afe3ea060332a03e17cc0581efd8 (diff)
Add `GodotTypeInfo::Metadata` to `MethodInfo`
Diffstat (limited to 'core/object/object.h')
-rw-r--r--core/object/object.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/object/object.h b/core/object/object.h
index f78c7c34fd..1644d54d87 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -222,6 +222,16 @@ struct MethodInfo {
int id = 0;
List<PropertyInfo> arguments;
Vector<Variant> default_arguments;
+ int return_val_metadata = 0;
+ Vector<int> arguments_metadata;
+
+ int get_argument_meta(int p_arg) const {
+ ERR_FAIL_COND_V(p_arg < -1 || p_arg > arguments.size(), 0);
+ if (p_arg == -1) {
+ return return_val_metadata;
+ }
+ return arguments_metadata.size() > p_arg ? arguments_metadata[p_arg] : 0;
+ }
inline bool operator==(const MethodInfo &p_method) const { return id == p_method.id; }
inline bool operator<(const MethodInfo &p_method) const { return id == p_method.id ? (name < p_method.name) : (id < p_method.id); }