yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

filesystem: Use std::string's empty() function instead of comparing against a literal

This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
This commit is contained in:
Lioncash 2018-07-19 10:32:21 -04:00
parent 2cc0ef83cf
commit abbf038191
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ constexpr u64 EMULATED_SD_REPORTED_SIZE = 32000000000;
static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base, static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
const std::string& dir_name) { const std::string& dir_name) {
if (dir_name == "." || dir_name == "" || dir_name == "/" || dir_name == "\\") if (dir_name.empty() || dir_name == "." || dir_name == "/" || dir_name == "\\")
return base; return base;
return base->GetDirectoryRelative(dir_name); return base->GetDirectoryRelative(dir_name);