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
|
@ -24,7 +24,7 @@ namespace Service::FileSystem {
|
|||
constexpr u64 EMULATED_SD_REPORTED_SIZE = 32000000000;
|
||||
|
||||
static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
|
||||
const std::string& dir_name) {
|
||||
std::string_view dir_name) {
|
||||
if (dir_name.empty() || dir_name == "." || dir_name == "/" || dir_name == "\\")
|
||||
return base;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue