file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where applicable.
This commit is contained in:
parent
ef163c1a15
commit
398444e676
10 changed files with 209 additions and 132 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue