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

String: Don't repeat calls to strlen in split, and make splitter_length const in get_slice. #99777

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

Ivorforce
Copy link
Member

Small optimization that just irked me as I went over the code.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

I suspect that this will have no effect on optimized builds, but it might help in debug builds, so probably worth cleaning up.

@clayjohn clayjohn added this to the 4.4 milestone Nov 28, 2024
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Code looks good to me.

@akien-mga akien-mga changed the title Don't repeat calls to strlen in split, and make splitter_length const in get_slice. String: Don't repeat calls to strlen in split, and make splitter_length const in get_slice. Nov 29, 2024
@akien-mga akien-mga merged commit b1d65e4 into godotengine:master Nov 29, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Ivorforce Ivorforce deleted the string-strlen-repeat-calls branch November 30, 2024 00:42
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