file_sys: std::move std::shared_ptr instances in constructors where applicable
By default, a regular copy requires an atomic increment and decrement. A move avoids this from occurring, which makes sense when the constructor is taking the shared_ptr by value.
This commit is contained in:
@ -76,7 +76,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path,
|
||||
u64 romfs_size = 0;
|
||||
|
||||
result = ncch_container.ReadRomFS(romfs_file, romfs_offset, romfs_size);
|
||||
file = std::make_unique<IVFCFile>(romfs_file, romfs_offset, romfs_size);
|
||||
file = std::make_unique<IVFCFile>(std::move(romfs_file), romfs_offset, romfs_size);
|
||||
} else if (filepath_type == NCCHFilePathType::Code ||
|
||||
filepath_type == NCCHFilePathType::ExeFS) {
|
||||
std::vector<u8> buffer;
|
||||
|
Reference in New Issue
Block a user