Skip to content

Core: Remove implicit conversions from IPAddress to String, to avoid accidental conversions #107406

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

Ivorforce
Copy link
Member

@Ivorforce Ivorforce commented Jun 11, 2025

Same idea as above - we want to avoid accidentally converting to String, because it's expensive.
I misjudged the number of conversion callers, but at least that makes this PR smaller than expected.

After this PR, there are just 3 implicit String operator conversions left:

  • Variant - probably can't fix this now, Variant has all the implicit conversions.
  • StringName - probably fine for now since it's usually fast (at least on repeated access).
  • NodePath - there's a lot of accessors, so it needs its own PR.

@Ivorforce Ivorforce requested a review from a team as a code owner June 11, 2025 13:47
@Ivorforce Ivorforce added this to the 4.x milestone Jun 11, 2025
@akien-mga akien-mga modified the milestones: 4.x, 4.6, 4.5 Jun 11, 2025
@akien-mga akien-mga merged commit d9cd011 into godotengine:master Jun 11, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Ivorforce Ivorforce deleted the ip-to-string-explicit branch June 11, 2025 23:27
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.

2 participants