From 59ab3f67d30fedd4423404b367a699bc992c6afd Mon Sep 17 00:00:00 2001 From: ARtsiomachka Date: Fri, 28 Feb 2025 14:36:47 +0100 Subject: [PATCH] Rename GDExtensionClassMethodInfo's arguments_info to arguments Also fixed GDExtensionClassVirtualMethodInfo name in another TODO. --- core/extension/gdextension.cpp | 4 ++-- core/extension/gdextension_interface.h | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index f40612ec3e7..8579e60b07e 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -181,7 +181,7 @@ public: List::ConstIterator itr = arguments_info.begin(); for (uint32_t i = 0; i < p_method_info->argument_count; ++itr, ++i) { - if (itr->type != (Variant::Type)p_method_info->arguments_info[i].type) { + if (itr->type != (Variant::Type)p_method_info->arguments[i].type) { return false; } } @@ -209,7 +209,7 @@ public: arguments_info.clear(); arguments_metadata.clear(); for (uint32_t i = 0; i < p_method_info->argument_count; i++) { - arguments_info.push_back(PropertyInfo(p_method_info->arguments_info[i])); + arguments_info.push_back(PropertyInfo(p_method_info->arguments[i])); arguments_metadata.push_back(GodotTypeInfo::Metadata(p_method_info->arguments_metadata[i])); } diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index ac0181e07e1..62242f2b98a 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -442,19 +442,17 @@ typedef struct { /* If `has_return_value` is false, `return_value_info` and `return_value_metadata` are ignored. * - * @todo Consider dropping `has_return_value` and making the other two properties match `GDExtensionMethodInfo` and `GDExtensionClassVirtualMethod` for consistency in future version of this struct. + * @todo Consider dropping `has_return_value` and making the other two properties match `GDExtensionMethodInfo` and `GDExtensionClassVirtualMethodInfo` for consistency in future version of this struct. */ GDExtensionBool has_return_value; GDExtensionPropertyInfo *return_value_info; GDExtensionClassMethodArgumentMetadata return_value_metadata; - /* Arguments: `arguments_info` and `arguments_metadata` are array of size `argument_count`. + /* Arguments: `arguments` and `arguments_metadata` are array of size `argument_count`. * Name and hint information for the argument can be omitted in release builds. Class name should always be present if it applies. - * - * @todo Consider renaming `arguments_info` to `arguments` for consistency in future version of this struct. */ uint32_t argument_count; - GDExtensionPropertyInfo *arguments_info; + GDExtensionPropertyInfo *arguments; GDExtensionClassMethodArgumentMetadata *arguments_metadata; /* Default arguments: `default_arguments` is an array of size `default_argument_count`. */