From cb09ea0f0174162a85f47fdb8446b397c3c57e20 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:23:19 -0400 Subject: general: Remove MakeResult helpers This is made obsolete by the presence of implicit constructors. --- src/core/hle/service/filesystem/filesystem.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/core/hle/service/filesystem/filesystem.cpp') diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index f8f9e32f7..42e468ce2 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -226,11 +226,10 @@ ResultVal VfsDirectoryServiceWrapper::OpenFile(const std:: } if (mode == FileSys::Mode::Append) { - return MakeResult( - std::make_shared(file, 0, file->GetSize())); + return std::make_shared(file, 0, file->GetSize()); } - return MakeResult(file); + return file; } ResultVal VfsDirectoryServiceWrapper::OpenDirectory(const std::string& path_) { @@ -240,7 +239,7 @@ ResultVal VfsDirectoryServiceWrapper::OpenDirectory(const s // TODO(DarkLordZach): Find a better error code for this return FileSys::ERROR_PATH_NOT_FOUND; } - return MakeResult(dir); + return dir; } ResultVal VfsDirectoryServiceWrapper::GetEntryType( @@ -252,12 +251,12 @@ ResultVal VfsDirectoryServiceWrapper::GetEntryType( auto filename = Common::FS::GetFilename(path); // TODO(Subv): Some games use the '/' path, find out what this means. if (filename.empty()) - return MakeResult(FileSys::EntryType::Directory); + return FileSys::EntryType::Directory; if (dir->GetFile(filename) != nullptr) - return MakeResult(FileSys::EntryType::File); + return FileSys::EntryType::File; if (dir->GetSubdirectory(filename) != nullptr) - return MakeResult(FileSys::EntryType::Directory); + return FileSys::EntryType::Directory; return FileSys::ERROR_PATH_NOT_FOUND; } @@ -270,7 +269,7 @@ ResultVal VfsDirectoryServiceWrapper::GetFileTimeStam if (GetEntryType(path).Failed()) { return FileSys::ERROR_PATH_NOT_FOUND; } - return MakeResult(dir->GetFileTimeStamp(Common::FS::GetFilename(path))); + return dir->GetFileTimeStamp(Common::FS::GetFilename(path)); } FileSystemController::FileSystemController(Core::System& system_) : system{system_} {} @@ -395,7 +394,7 @@ ResultVal FileSystemController::OpenSaveDataSpace( return FileSys::ERROR_ENTITY_NOT_FOUND; } - return MakeResult(save_data_factory->GetSaveDataSpaceDirectory(space)); + return save_data_factory->GetSaveDataSpaceDirectory(space); } ResultVal FileSystemController::OpenSDMC() const { @@ -421,7 +420,7 @@ ResultVal FileSystemController::OpenBISPartition( return FileSys::ERROR_INVALID_ARGUMENT; } - return MakeResult(std::move(part)); + return part; } ResultVal FileSystemController::OpenBISPartitionStorage( @@ -437,7 +436,7 @@ ResultVal FileSystemController::OpenBISPartitionStorage( return FileSys::ERROR_INVALID_ARGUMENT; } - return MakeResult(std::move(part)); + return part; } u64 FileSystemController::GetFreeSpaceSize(FileSys::StorageId id) const { -- cgit v1.2.3