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

Add a const call mode to Object, Variant and Script. #62468

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

fire
Copy link
Member

@fire fire commented Jun 27, 2022

For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script).

This mode ensures only const functions can be called, making it safe to use from the editor.

Co-Authored-By: reduz [email protected]

@fire fire requested review from a team as code owners June 27, 2022 20:19
@fire fire force-pushed the core-const-expressions branch from dbd6f86 to 050088b Compare June 27, 2022 20:32
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script).

This mode ensures only const functions can be called, making it safe to use from the editor.

Co-Authored-By: reduz <[email protected]>
@fire fire force-pushed the core-const-expressions branch from 050088b to 9ddebc0 Compare June 27, 2022 20:33
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for putting the extra work for the sake of review/readability.

@akien-mga akien-mga merged commit b863c40 into godotengine:master Jun 27, 2022
@akien-mga
Copy link
Member

Thanks!

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.

4 participants