You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.
This commit is contained in:
@@ -53,7 +53,7 @@ static String fix_path(const String &p_path) {
|
||||
if (p_path.is_relative_path()) {
|
||||
Char16String current_dir_name;
|
||||
size_t str_len = GetCurrentDirectoryW(0, nullptr);
|
||||
current_dir_name.resize(str_len + 1);
|
||||
current_dir_name.resize_uninitialized(str_len + 1);
|
||||
GetCurrentDirectoryW(current_dir_name.size(), (LPWSTR)current_dir_name.ptrw());
|
||||
path = String::utf16((const char16_t *)current_dir_name.get_data()).trim_prefix(R"(\\?\)").replace_char('\\', '/').path_join(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user