godot icon indicating copy to clipboard operation
godot copied to clipboard

Rename `String::resize` to `resize_uninitialized`

Open Ivorforce opened this issue 5 months ago • 5 comments
trafficstars

  • Follow-up of https://github.com/godotengine/godot/pull/104522

As discussed in Core meetings, resize is ambiguous in the current codebase, because new elements are sometimes initialized, but not initialized other times, depending on the element type.

LocalVector and Vector have already received new, clearer resize_initialized and resize_uninitialized functions. String is an easy contender to swap the name out directly, since there are not that many callers. I implemented this by renaming the method, and fixing compile problems until it succeeded compiling.

Ivorforce avatar May 28 '25 18:05 Ivorforce