2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

fsmitm_romfsbuild: Remove unnecessary loops in Build()

The std::vector instances are already initially allocated with all
entries having these values, there's no need to loop through and fill
them with it again when they aren't modified.
This commit is contained in:
Lioncash 2018-09-25 18:14:29 -04:00
parent fa9e0f9c8b
commit 1f92cbc059

View file

@ -233,12 +233,6 @@ std::map<u64, VirtualFile> RomFSBuildContext::Build() {
std::vector<u8> dir_table(dir_table_size);
std::vector<u8> file_table(file_table_size);
// Clear out hash tables.
for (u32 i = 0; i < dir_hash_table_entry_count; i++)
dir_hash_table[i] = ROMFS_ENTRY_EMPTY;
for (u32 i = 0; i < file_hash_table_entry_count; i++)
file_hash_table[i] = ROMFS_ENTRY_EMPTY;
std::shared_ptr<RomFSBuildFileContext> cur_file;
// Determine file offsets.