summaryrefslogtreecommitdiff
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorGravatar bunnei2020-04-17 00:59:08 -0400
committerGravatar bunnei2020-04-17 00:59:36 -0400
commit8bbe74a8dc62cd3933fd08237e707b0059fe8a78 (patch)
tree61b6af4968dcb52ba84aebdffd3cff0f3c5864ce /src/core/hle/service
parentcore: device_memory: Remove incorrect usage of constexpr. (diff)
downloadyuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.gz
yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.tar.xz
yuzu-8bbe74a8dc62cd3933fd08237e707b0059fe8a78.zip
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.cpp13
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:
298 continue; 298 continue;
299 } 299 }
300 300
301 if (result.IsError()) { 301 CASCADE_CODE(result);
302 return result;
303 }
304 302
305 if (ValidateRegionForMap(page_table, addr, size)) { 303 if (ValidateRegionForMap(page_table, addr, size)) {
306 return MakeResult<VAddr>(addr); 304 return MakeResult<VAddr>(addr);
@@ -470,16 +468,15 @@ public:
470 } 468 }
471 469
472 // Map memory for the NRO 470 // Map memory for the NRO
473 const ResultVal<VAddr> map_result{MapNro(system.CurrentProcess(), nro_address, nro_size, 471 const auto map_result{MapNro(system.CurrentProcess(), nro_address, nro_size, bss_address,
474 bss_address, bss_size, nro_size + bss_size)}; 472 bss_size, nro_size + bss_size)};
475 if (map_result.Failed()) { 473 if (map_result.Failed()) {
476 IPC::ResponseBuilder rb{ctx, 2}; 474 IPC::ResponseBuilder rb{ctx, 2};
477 rb.Push(map_result.Code()); 475 rb.Push(map_result.Code());
478 } 476 }
479 477
480 // Load the NRO into the mapped memory 478 // Load the NRO into the mapped memory
481 if (const ResultCode result{ 479 if (const auto result{LoadNro(system.CurrentProcess(), header, nro_address, *map_result)};
482 LoadNro(system.CurrentProcess(), header, nro_address, *map_result)};
483 result.IsError()) { 480 result.IsError()) {
484 IPC::ResponseBuilder rb{ctx, 2}; 481 IPC::ResponseBuilder rb{ctx, 2};
485 rb.Push(map_result.Code()); 482 rb.Push(map_result.Code());
@@ -551,7 +548,7 @@ public:
551 return; 548 return;
552 } 549 }
553 550
554 const ResultCode result{UnmapNro(iter->second)}; 551 const auto result{UnmapNro(iter->second)};
555 552
556 system.InvalidateCpuInstructionCaches(); 553 system.InvalidateCpuInstructionCaches();
557 554