diff options
| author | JosJuice <josjuice@gmail.com> | 2015-08-08 19:59:33 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-06-14 15:23:48 +0200 |
| commit | 87916fe09979eea276438deef83ba85fcace91e0 (patch) | |
| tree | b8b20059d8c1d7e8cdd310d8d54a37ad2d4ed819 /Source/Core/DiscIO/VolumeGC.cpp | |
| parent | ee2b88ebb627869a6153fe3135df232793f02e87 (diff) | |
Filesystem: Replace GetFileList()
Instead of expecting callers to know how the size of directory file infos
relates to which files are in which directories, filesystems now offer a
GetRoot() method, and file infos offer a way to get their children. As
a bonus, m_FileInfoVector no longer has to be created and kept around
in RAM. Only the file info objects that actually are used are created.
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeGC.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 09f073d075..af4178682f 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -177,7 +177,7 @@ void VolumeGC::LoadBannerFile() const if (!file_system) return; - const FileInfo* file_info = file_system->FindFileInfo("opening.bnr"); + std::unique_ptr<FileInfo> file_info = file_system->FindFileInfo("opening.bnr"); if (!file_info) return; @@ -190,7 +190,8 @@ void VolumeGC::LoadBannerFile() const return; } - if (file_size != file_system->ReadFile(file_info, reinterpret_cast<u8*>(&banner_file), file_size)) + if (file_size != + file_system->ReadFile(file_info.get(), reinterpret_cast<u8*>(&banner_file), file_size)) { WARN_LOG(DISCIO, "Could not read opening.bnr."); return; |
