mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.
This commit is contained in:
parent
51b0379e55
commit
b13a0e1834
26 changed files with 103 additions and 98 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue