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:
@@ -143,7 +143,7 @@ String Resource::generate_scene_unique_id() {
|
||||
static constexpr uint32_t char_count = ('z' - 'a');
|
||||
static constexpr uint32_t base = char_count + ('9' - '0');
|
||||
String id;
|
||||
id.resize(characters + 1);
|
||||
id.resize_uninitialized(characters + 1);
|
||||
char32_t *ptr = id.ptrw();
|
||||
for (uint32_t i = 0; i < characters; i++) {
|
||||
uint32_t c = random_num % base;
|
||||
|
||||
Reference in New Issue
Block a user