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

Move rpc and rpc_id implementations back to header #63820

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

nathanfranke
Copy link
Contributor

@nathanfranke nathanfranke commented Aug 2, 2022

Fixes this concern: #63049 (comment)

StackOverflow on why this is needed (TL;DR templates must be in header): https://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file


I think the reason why this wasn't causing much issues in the engine is right now there are no engine components that use RPCs.

Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

I can confirm that this resolves the linker errors. It's a slightly different solution than what I came up with, in this PR they are in the header but not inside the node class declaration. Also, it occurred to me that it might be worth adding a comment saying that they must be in the header.

@akien-mga akien-mga merged commit 6678921 into godotengine:master Aug 3, 2022
@akien-mga
Copy link
Member

Thanks!

@nathanfranke nathanfranke deleted the templates-in-header branch August 3, 2022 11:59
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.

3 participants