diff options
| author | bunnei <bunneidev@gmail.com> | 2020-04-17 00:59:08 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2020-04-17 00:59:36 -0400 |
| commit | 8bbe74a8dc62cd3933fd08237e707b0059fe8a78 (patch) | |
| tree | 61b6af4968dcb52ba84aebdffd3cff0f3c5864ce /src/core/hle/service | |
| parent | 92caa003a8fabf177f012a4f59ac4e123cbb4e98 (diff) | |
core: hle: Address various feedback & code cleanup.
- Should be no functional changes.
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 73a2bc770..0cde7a557 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -298,9 +298,7 @@ public: continue; } - if (result.IsError()) { - return result; - } + CASCADE_CODE(result); if (ValidateRegionForMap(page_table, addr, size)) { return MakeResult<VAddr>(addr); @@ -470,16 +468,15 @@ public: } // Map memory for the NRO - const ResultVal<VAddr> map_result{MapNro(system.CurrentProcess(), nro_address, nro_size, - bss_address, bss_size, nro_size + bss_size)}; + const auto map_result{MapNro(system.CurrentProcess(), nro_address, nro_size, bss_address, + bss_size, nro_size + bss_size)}; if (map_result.Failed()) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(map_result.Code()); } // Load the NRO into the mapped memory - if (const ResultCode result{ - LoadNro(system.CurrentProcess(), header, nro_address, *map_result)}; + if (const auto result{LoadNro(system.CurrentProcess(), header, nro_address, *map_result)}; result.IsError()) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(map_result.Code()); @@ -551,7 +548,7 @@ public: return; } - const ResultCode result{UnmapNro(iter->second)}; + const auto result{UnmapNro(iter->second)}; system.InvalidateCpuInstructionCaches(); |
