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/VolumeWii.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/VolumeWii.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWii.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 6b1cf6dafa..b8215527a6 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -274,9 +274,9 @@ std::map<Language, std::string> VolumeWii::GetLongNames() const return {}; std::vector<u8> opening_bnr(NAMES_TOTAL_BYTES); - const FileInfo* file_info = file_system->FindFileInfo("opening.bnr"); - size_t size = file_system->ReadFile(file_info, opening_bnr.data(), opening_bnr.size(), 0x5C); - opening_bnr.resize(size); + std::unique_ptr<FileInfo> file_info = file_system->FindFileInfo("opening.bnr"); + opening_bnr.resize( + file_system->ReadFile(file_info.get(), opening_bnr.data(), opening_bnr.size(), 0x5C)); return ReadWiiNames(opening_bnr); } |
