diff options
| author | 2021-11-02 17:23:19 -0400 | |
|---|---|---|
| committer | 2021-11-02 17:23:19 -0400 | |
| commit | cb09ea0f0174162a85f47fdb8446b397c3c57e20 (patch) | |
| tree | 5cbd9a62e1daf1c1de97444858064fe8210df077 /src/core/file_sys | |
| parent | hle/result: Amend ResultVal documentation (diff) | |
| download | yuzu-cb09ea0f0174162a85f47fdb8446b397c3c57e20.tar.gz yuzu-cb09ea0f0174162a85f47fdb8446b397c3c57e20.tar.xz yuzu-cb09ea0f0174162a85f47fdb8446b397c3c57e20.zip | |
general: Remove MakeResult helpers
This is made obsolete by the presence of implicit constructors.
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/romfs_factory.cpp | 10 | ||||
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 4 | ||||
| -rw-r--r-- | src/core/file_sys/sdmc_factory.cpp | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index 638c6cea8..3d9ce863b 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp | |||
| @@ -39,13 +39,12 @@ void RomFSFactory::SetPackedUpdate(VirtualFile update_raw_file) { | |||
| 39 | 39 | ||
| 40 | ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess(u64 current_process_title_id) const { | 40 | ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess(u64 current_process_title_id) const { |
| 41 | if (!updatable) { | 41 | if (!updatable) { |
| 42 | return MakeResult<VirtualFile>(file); | 42 | return file; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | const PatchManager patch_manager{current_process_title_id, filesystem_controller, | 45 | const PatchManager patch_manager{current_process_title_id, filesystem_controller, |
| 46 | content_provider}; | 46 | content_provider}; |
| 47 | return MakeResult<VirtualFile>( | 47 | return patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw); |
| 48 | patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw)); | ||
| 49 | } | 48 | } |
| 50 | 49 | ||
| 51 | ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecordType type) const { | 50 | ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecordType type) const { |
| @@ -58,8 +57,7 @@ ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecor | |||
| 58 | 57 | ||
| 59 | const PatchManager patch_manager{title_id, filesystem_controller, content_provider}; | 58 | const PatchManager patch_manager{title_id, filesystem_controller, content_provider}; |
| 60 | 59 | ||
| 61 | return MakeResult<VirtualFile>( | 60 | return patch_manager.PatchRomFS(nca->GetRomFS(), nca->GetBaseIVFCOffset(), type); |
| 62 | patch_manager.PatchRomFS(nca->GetRomFS(), nca->GetBaseIVFCOffset(), type)); | ||
| 63 | } | 61 | } |
| 64 | 62 | ||
| 65 | ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFSWithProgramIndex( | 63 | ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFSWithProgramIndex( |
| @@ -83,7 +81,7 @@ ResultVal<VirtualFile> RomFSFactory::Open(u64 title_id, StorageId storage, | |||
| 83 | return ResultUnknown; | 81 | return ResultUnknown; |
| 84 | } | 82 | } |
| 85 | 83 | ||
| 86 | return MakeResult<VirtualFile>(romfs); | 84 | return romfs; |
| 87 | } | 85 | } |
| 88 | 86 | ||
| 89 | std::shared_ptr<NCA> RomFSFactory::GetEntry(u64 title_id, StorageId storage, | 87 | std::shared_ptr<NCA> RomFSFactory::GetEntry(u64 title_id, StorageId storage, |
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index b5254dd75..0c8ec4ba2 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -94,7 +94,7 @@ ResultVal<VirtualDir> SaveDataFactory::Create(SaveDataSpaceId space, | |||
| 94 | return ResultUnknown; | 94 | return ResultUnknown; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | return MakeResult<VirtualDir>(std::move(out)); | 97 | return out; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, | 100 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, |
| @@ -115,7 +115,7 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, | |||
| 115 | return ResultUnknown; | 115 | return ResultUnknown; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | return MakeResult<VirtualDir>(std::move(out)); | 118 | return out; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | VirtualDir SaveDataFactory::GetSaveDataSpaceDirectory(SaveDataSpaceId space) const { | 121 | VirtualDir SaveDataFactory::GetSaveDataSpaceDirectory(SaveDataSpaceId space) const { |
diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp index e5c72cd4d..c0e13e56f 100644 --- a/src/core/file_sys/sdmc_factory.cpp +++ b/src/core/file_sys/sdmc_factory.cpp | |||
| @@ -25,7 +25,7 @@ SDMCFactory::SDMCFactory(VirtualDir sd_dir_, VirtualDir sd_mod_dir_) | |||
| 25 | SDMCFactory::~SDMCFactory() = default; | 25 | SDMCFactory::~SDMCFactory() = default; |
| 26 | 26 | ||
| 27 | ResultVal<VirtualDir> SDMCFactory::Open() const { | 27 | ResultVal<VirtualDir> SDMCFactory::Open() const { |
| 28 | return MakeResult<VirtualDir>(sd_dir); | 28 | return sd_dir; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | VirtualDir SDMCFactory::GetSDMCModificationLoadRoot(u64 title_id) const { | 31 | VirtualDir SDMCFactory::GetSDMCModificationLoadRoot(u64 title_id) const { |