Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Sync classref with Variant utility methods #43612

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Nov 17, 2020

Copied relevant documentation from the original @GDScript built-ins,
which will likely be removed in a future commit.

Various fixups to variant_utility.cpp while working on this.

@@ -695,9 +704,9 @@ struct VariantUtilityFunctions {
return p_arr.hash();
}

static inline Variant instance_from_id(int64_t p_id) {
static inline Object *instance_from_id(int64_t p_id) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reduz I guess it's fine to return Object * directly? That's what the GDScript method does, and it seems to compile fine.

@@ -829,22 +838,18 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) {
static void call(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { \
call_helperr(VariantUtilityFunctions::m_func, r_ret, p_args, r_error); \
} \
\
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this goes against the usual policy but in such macro code, I figure it might be best to keep things compat and avoid empty lines with a trailing \. The alternative would have been to add the missing separation lines + trailing \ but it didn't feel right.

Copied relevant documentation from the original `@GDScript` built-ins,
which will likely be removed in a future commit.

Various fixups to `variant_utility.cpp` while working on this.
@akien-mga akien-mga merged commit 408effa into godotengine:master Nov 17, 2020
@akien-mga akien-mga deleted the variant-utils-doc branch November 17, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant