diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-19 10:32:21 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-19 10:32:23 -0400 |
commit | abbf038191e834c47aba0d35c2468a159287f9ca (patch) | |
tree | 24f06594b1ca8b1fadc06e062a386be4a911d5a2 | |
parent | 2cc0ef83cfd553b6d6e4d33d65c9aece133fa4ff (diff) |
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).
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 6d5ef2de4..a6b8386a7 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -23,7 +23,7 @@ constexpr u64 EMULATED_SD_REPORTED_SIZE = 32000000000; static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base, 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->GetDirectoryRelative(dir_name); |