file_util, vfs: Use std::string_view where applicable

Avoids unnecessary construction of std::string instances where
applicable.
This commit is contained in:
Lioncash
2018-07-22 01:23:29 -04:00
parent ef163c1a15
commit 398444e676
10 changed files with 209 additions and 132 deletions

View File

@ -80,7 +80,7 @@ size_t OffsetVfsFile::WriteBytes(const std::vector<u8>& data, size_t r_offset) {
return file->Write(data.data(), TrimToFit(data.size(), r_offset), offset + r_offset);
}
bool OffsetVfsFile::Rename(const std::string& name) {
bool OffsetVfsFile::Rename(std::string_view name) {
return file->Rename(name);
}