Skip to content

Autocompletion: Remove unnecessary HashMap copy#118221

Open
HolonProduction wants to merge 1 commit into
godotengine:masterfrom
HolonProduction:completion-autoload-copy
Open

Autocompletion: Remove unnecessary HashMap copy#118221
HolonProduction wants to merge 1 commit into
godotengine:masterfrom
HolonProduction:completion-autoload-copy

Conversation

@HolonProduction
Copy link
Copy Markdown
Member

@HolonProduction HolonProduction commented Apr 5, 2026

The explicit copy is from #115093 so the original implicit copy was likely an accident. There is no need to copy in this situation.

@HolonProduction HolonProduction force-pushed the completion-autoload-copy branch from 3bd2863 to 040ebdd Compare May 5, 2026 07:55
@clayjohn clayjohn requested a review from Ivorforce May 5, 2026 15:16
Copy link
Copy Markdown
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

The explicit copy in #115093 wasn't a mistake. It was merely agnostic.

When making core changes, we don't have time to understand every single caller. So instead of trying to fix them, risking introducing bugs, we make the interface change and change callers to do the same as they did before.

Meanwhile, we hope people will in follow-ups fix the problems this kind of changes surfaces. As you do here :)

In this case it seems safe to use a reference since this is (observably) a leaf function.

@HolonProduction
Copy link
Copy Markdown
Member Author

Oh yeah it was meant as "this was made explicit in xyz, so the original implicit copy was probably added by accident"

@clayjohn clayjohn modified the milestones: 4.x, 4.8 May 5, 2026
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