You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.
This commit is contained in:
@@ -58,7 +58,7 @@ bool is_operator_char(unsigned char c) {
|
||||
String remove_spaces(String &p_str) {
|
||||
String res;
|
||||
// Result is guaranteed to not be longer than the input.
|
||||
res.resize(p_str.size());
|
||||
res.resize_uninitialized(p_str.size());
|
||||
int wp = 0;
|
||||
char32_t last = 0;
|
||||
bool has_removed = false;
|
||||
@@ -82,7 +82,7 @@ String remove_spaces(String &p_str) {
|
||||
last = c;
|
||||
}
|
||||
}
|
||||
res.resize(wp);
|
||||
res.resize_uninitialized(wp);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user