1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.

This commit is contained in:
Lukas Tenbrink
2025-05-28 20:33:21 +02:00
parent 51b0379e55
commit b13a0e1834
26 changed files with 103 additions and 98 deletions

View File

@@ -294,7 +294,7 @@
}
Char16String text;
text.resize([characters length] + 1);
text.resize_uninitialized([characters length] + 1);
[characters getCharacters:(unichar *)text.ptrw() range:NSMakeRange(0, [characters length])];
String u32text = String::utf16(text.ptr(), text.length());
@@ -680,7 +680,7 @@
if (!wd.im_active && length > 0 && keycode_has_unicode(KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags], true))) {
// Fallback unicode character handler used if IME is not active.
Char16String text;
text.resize([characters length] + 1);
text.resize_uninitialized([characters length] + 1);
[characters getCharacters:(unichar *)text.ptrw() range:NSMakeRange(0, [characters length])];
String u32text = String::utf16(text.ptr(), text.length());