1
0
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:
Lukas Tenbrink
2025-03-14 09:26:29 +01:00
parent 7e4f6bdb59
commit f4de2cd22a
6 changed files with 7 additions and 15 deletions

View File

@@ -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));