diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-17 06:59:08 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-04-17 06:59:36 +0200 |
commit | 8bbe74a8dc62cd3933fd08237e707b0059fe8a78 (patch) | |
tree | 61b6af4968dcb52ba84aebdffd3cff0f3c5864ce /src/core/hle/service/ldr | |
parent | core: device_memory: Remove incorrect usage of constexpr. (diff) | |
download | yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.gz yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.bz2 yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.lz yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.xz yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.zst yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.zip |
Diffstat (limited to 'src/core/hle/service/ldr')
-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(); |