summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/memory/memory_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-15 20:49:45 +0200
committerLioncash <mathew1800@gmail.com>2020-10-18 01:50:39 +0200
commitbe1954e04cb5a0c3a526f78ed5490a5e65310280 (patch)
tree267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/core/hle/kernel/memory/memory_manager.cpp
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.gz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.bz2
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.lz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.xz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.zst
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/memory/memory_manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/memory/memory_manager.cpp b/src/core/hle/kernel/memory/memory_manager.cpp
index acf13585c..a96157c37 100644
--- a/src/core/hle/kernel/memory/memory_manager.cpp
+++ b/src/core/hle/kernel/memory/memory_manager.cpp
@@ -71,7 +71,7 @@ VAddr MemoryManager::AllocateContinuous(std::size_t num_pages, std::size_t align
}
// If we allocated more than we need, free some
- const auto allocated_pages{PageHeap::GetBlockNumPages(heap_index)};
+ const auto allocated_pages{PageHeap::GetBlockNumPages(static_cast<u32>(heap_index))};
if (allocated_pages > num_pages) {
chosen_manager.Free(allocated_block + num_pages * PageSize, allocated_pages - num_pages);
}
@@ -112,7 +112,7 @@ ResultCode MemoryManager::Allocate(PageLinkedList& page_list, std::size_t num_pa
// Keep allocating until we've allocated all our pages
for (s32 index{heap_index}; index >= 0 && num_pages > 0; index--) {
- const auto pages_per_alloc{PageHeap::GetBlockNumPages(index)};
+ const auto pages_per_alloc{PageHeap::GetBlockNumPages(static_cast<u32>(index))};
while (num_pages >= pages_per_alloc) {
// Allocate a block