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

@@ -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;