You've already forked godot
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user