Merge pull request #713 from lioncash/filesys

filesystem: Minor changes
This commit is contained in:
bunnei 2018-07-19 11:49:06 -07:00 committed by GitHub
commit 427fc4ac6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#pragma optimize("", off) #include <utility>
#include "common/assert.h" #include "common/assert.h"
#include "common/file_util.h" #include "common/file_util.h"
@ -25,14 +25,14 @@ 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);
} }
VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_) VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_)
: backing(backing_) {} : backing(std::move(backing_)) {}
std::string VfsDirectoryServiceWrapper::GetName() const { std::string VfsDirectoryServiceWrapper::GetName() const {
return backing->GetName(); return backing->GetName();