file-sys: Make use of std::string_view where applicable

Same behavior, but makes the interface more flexible and allows
non-std::string instances to be used with it.
This commit is contained in:
Lioncash
2020-05-01 09:43:02 -04:00
parent 85d37c9994
commit 147073a5a0
6 changed files with 20 additions and 20 deletions

View File

@ -22,7 +22,7 @@ SERIALIZE_EXPORT_IMPL(FileSys::ArchiveFactory_SystemSaveData)
namespace FileSys {
std::string GetSystemSaveDataPath(const std::string& mount_point, const Path& path) {
std::string GetSystemSaveDataPath(std::string_view mount_point, const Path& path) {
const std::vector<u8> vec_data = path.AsBinary();
u32 save_low;
u32 save_high;
@ -31,7 +31,7 @@ std::string GetSystemSaveDataPath(const std::string& mount_point, const Path& pa
return fmt::format("{}{:08X}/{:08X}/", mount_point, save_low, save_high);
}
std::string GetSystemSaveDataContainerPath(const std::string& mount_point) {
std::string GetSystemSaveDataContainerPath(std::string_view mount_point) {
return fmt::format("{}data/{}/sysdata/", mount_point, SYSTEM_ID);
}