mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 14:28:34 +00:00
Merge pull request #2338 from JosJuice/getfilelist-return
Filesystem: Return file list reference instead of modifying argument
This commit is contained in:
commit
2ae6fb9240
7 changed files with 28 additions and 58 deletions
|
@ -210,18 +210,12 @@ std::string CFileSystemGCWii::GetStringFromOffset(u64 _Offset) const
|
|||
return SHIFTJISToUTF8(data);
|
||||
}
|
||||
|
||||
size_t CFileSystemGCWii::GetFileList(std::vector<const SFileInfo *> &_rFilenames)
|
||||
const std::vector<SFileInfo>& CFileSystemGCWii::GetFileList()
|
||||
{
|
||||
if (!m_Initialized)
|
||||
InitFileSystem();
|
||||
|
||||
if (_rFilenames.size())
|
||||
PanicAlert("GetFileList : input list has contents?");
|
||||
_rFilenames.clear();
|
||||
_rFilenames.reserve(m_FileInfoVector.size());
|
||||
for (auto& fileInfo : m_FileInfoVector)
|
||||
_rFilenames.push_back(&fileInfo);
|
||||
return m_FileInfoVector.size();
|
||||
return m_FileInfoVector;
|
||||
}
|
||||
|
||||
const SFileInfo* CFileSystemGCWii::FindFileInfo(const std::string& _rFullPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue