summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-07-24 06:57:57 -0400
committerGravatar Lioncash2019-08-29 19:28:04 -0400
commit70485e690bbab456290999a2796fa46f8f55e4fd (patch)
tree9d9919e2b0bd174240a252106f3a687f75be2acb
parentkernel/vm_manager: Simplify some assertion messages (diff)
downloadyuzu-70485e690bbab456290999a2796fa46f8f55e4fd.tar.gz
yuzu-70485e690bbab456290999a2796fa46f8f55e4fd.tar.xz
yuzu-70485e690bbab456290999a2796fa46f8f55e4fd.zip
kernel/vm_manager: Simplify some std::vector constructor calls
Same behavior, one less magic constant to read.
-rw-r--r--src/core/hle/kernel/vm_manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 21ab01240..231e42baa 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -342,7 +342,7 @@ ResultCode VMManager::MapPhysicalMemory(VAddr target, u64 size) {
342 const auto map_size = std::min(end_addr - cur_addr, vma_end - cur_addr); 342 const auto map_size = std::min(end_addr - cur_addr, vma_end - cur_addr);
343 if (vma.state == MemoryState::Unmapped) { 343 if (vma.state == MemoryState::Unmapped) {
344 const auto map_res = 344 const auto map_res =
345 MapMemoryBlock(cur_addr, std::make_shared<PhysicalMemory>(map_size, 0), 0, 345 MapMemoryBlock(cur_addr, std::make_shared<PhysicalMemory>(map_size), 0,
346 map_size, MemoryState::Heap, VMAPermission::ReadWrite); 346 map_size, MemoryState::Heap, VMAPermission::ReadWrite);
347 result = map_res.Code(); 347 result = map_res.Code();
348 if (result.IsError()) { 348 if (result.IsError()) {
@@ -443,7 +443,7 @@ ResultCode VMManager::UnmapPhysicalMemory(VAddr target, u64 size) {
443 if (result.IsError()) { 443 if (result.IsError()) {
444 for (const auto [map_address, map_size] : unmapped_regions) { 444 for (const auto [map_address, map_size] : unmapped_regions) {
445 const auto remap_res = 445 const auto remap_res =
446 MapMemoryBlock(map_address, std::make_shared<PhysicalMemory>(map_size, 0), 0, 446 MapMemoryBlock(map_address, std::make_shared<PhysicalMemory>(map_size), 0,
447 map_size, MemoryState::Heap, VMAPermission::None); 447 map_size, MemoryState::Heap, VMAPermission::None);
448 ASSERT_MSG(remap_res.Succeeded(), "Failed to remap a memory block."); 448 ASSERT_MSG(remap_res.Succeeded(), "Failed to remap a memory block.");
449 } 449 }