From abbf038191e834c47aba0d35c2468a159287f9ca Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Jul 2018 10:32:21 -0400 Subject: [PATCH] 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). --- src/core/hle/service/filesystem/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);