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

@ -49,7 +49,8 @@ FileType GuessFromFilename(const std::string& name) {
if (name == "main")
return FileType::DeconstructedRomDirectory;
const std::string extension = Common::ToLower(FileUtil::GetExtensionFromFilename(name));
const std::string extension =
Common::ToLower(std::string(FileUtil::GetExtensionFromFilename(name)));
if (extension == "elf")
return FileType::ELF;