You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Use resize_zeroed instead of resize then fill(0) in several places.
This commit is contained in:
@@ -229,10 +229,8 @@ Error WindowsUtils::copy_and_rename_pdb(const String &p_dll_path) {
|
||||
file->store_buffer(u8);
|
||||
|
||||
// Terminate string and fill the remaining part of the original string with the '\0'.
|
||||
// Can be replaced by file->store_8('\0');
|
||||
Vector<uint8_t> padding_buffer;
|
||||
padding_buffer.resize((int64_t)original_path_size - u8.size());
|
||||
padding_buffer.fill('\0');
|
||||
padding_buffer.resize_zeroed((int64_t)original_path_size - u8.size());
|
||||
file->store_buffer(padding_buffer);
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, vformat("Failed to write a new PDB path to '%s'.", p_dll_path));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user