summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2020-06-17 13:30:06 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2020-06-18 16:47:44 +0200
commitb19fe55f8420ab6f6b8ef35ef7d80be54a02ce17 (patch)
tree58a9919d651f6a0aaacb400fd74f2704f64ebda9 /src/core/hle
parentshared_font: Service::NS::EncryptSharedFont takes a size_t& (diff)
downloadyuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar.gz
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar.bz2
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar.lz
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar.xz
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.tar.zst
yuzu-b19fe55f8420ab6f6b8ef35ef7d80be54a02ce17.zip
Diffstat (limited to 'src/core/hle')
-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 6b432e1b2..616148190 100644
--- a/src/core/hle/kernel/memory/memory_manager.cpp
+++ b/src/core/hle/kernel/memory/memory_manager.cpp
@@ -104,7 +104,7 @@ ResultCode MemoryManager::Allocate(PageLinkedList& page_list, std::size_t num_pa
// Ensure that we don't leave anything un-freed
auto group_guard = detail::ScopeExit([&] {
for (const auto& it : page_list.Nodes()) {
- const auto min_num_pages{std::min(
+ const auto min_num_pages{std::min<size_t>(
it.GetNumPages(), (chosen_manager.GetEndAddress() - it.GetAddress()) / PageSize)};
chosen_manager.Free(it.GetAddress(), min_num_pages);
}
@@ -165,7 +165,7 @@ ResultCode MemoryManager::Free(PageLinkedList& page_list, std::size_t num_pages,
// Free all of the pages
for (const auto& it : page_list.Nodes()) {
- const auto min_num_pages{std::min(
+ const auto min_num_pages{std::min<size_t>(
it.GetNumPages(), (chosen_manager.GetEndAddress() - it.GetAddress()) / PageSize)};
chosen_manager.Free(it.GetAddress(), min_num_pages);
}