mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 17:18:53 +00:00
DiscIO: Use std::string_view in FileSystem::FindFileInfo
...and in the functions that call it.
This commit is contained in:
parent
5fb56505b2
commit
d4b069f458
8 changed files with 35 additions and 21 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -90,7 +91,7 @@ public:
|
|||
|
||||
bool IsValid() const override { return m_valid; }
|
||||
const FileInfo& GetRoot() const override;
|
||||
std::unique_ptr<FileInfo> FindFileInfo(const std::string& path) const override;
|
||||
std::unique_ptr<FileInfo> FindFileInfo(std::string_view path) const override;
|
||||
std::unique_ptr<FileInfo> FindFileInfo(u64 disc_offset) const override;
|
||||
|
||||
private:
|
||||
|
@ -100,7 +101,7 @@ private:
|
|||
// Maps the end offset of files to FST indexes
|
||||
mutable std::map<u64, u32> m_offset_file_info_cache;
|
||||
|
||||
std::unique_ptr<FileInfo> FindFileInfo(const std::string& path, const FileInfo& file_info) const;
|
||||
std::unique_ptr<FileInfo> FindFileInfo(std::string_view path, const FileInfo& file_info) const;
|
||||
};
|
||||
|
||||
} // namespace DiscIO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue