You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.
This commit is contained in:
@@ -85,7 +85,7 @@ String FileAccessWindows::fix_path(const String &p_path) const {
|
||||
if (r_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());
|
||||
r_path = String::utf16((const char16_t *)current_dir_name.get_data()).trim_prefix(R"(\\?\)").replace_char('\\', '/').path_join(r_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user