summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-25 06:01:13 +0200
committerbunnei <bunneidev@gmail.com>2018-03-27 03:17:01 +0200
commitd4fb8a887cd88f2cbbf34b3f97e595070e231997 (patch)
tree1db030a0d59de6a4718eeba686f366bc2aafb910 /src/core
parentmaxwel_to_gl: Fix string formatting in log statements. (diff)
downloadyuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar.gz
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar.bz2
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar.lz
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar.xz
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.tar.zst
yuzu-d4fb8a887cd88f2cbbf34b3f97e595070e231997.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/memory.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 47c4828f7..291bf066f 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -439,7 +439,8 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_
size_t page_offset = src_addr & PAGE_MASK;
while (remaining_size > 0) {
- const size_t copy_amount = std::min(PAGE_SIZE - page_offset, remaining_size);
+ const size_t copy_amount =
+ std::min(static_cast<size_t>(PAGE_SIZE) - page_offset, remaining_size);
const VAddr current_vaddr = static_cast<VAddr>((page_index << PAGE_BITS) + page_offset);
switch (page_table.attributes[page_index]) {
@@ -501,7 +502,8 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi
size_t page_offset = dest_addr & PAGE_MASK;
while (remaining_size > 0) {
- const size_t copy_amount = std::min(PAGE_SIZE - page_offset, remaining_size);
+ const size_t copy_amount =
+ std::min(static_cast<size_t>(PAGE_SIZE) - page_offset, remaining_size);
const VAddr current_vaddr = static_cast<VAddr>((page_index << PAGE_BITS) + page_offset);
switch (page_table.attributes[page_index]) {
@@ -548,7 +550,8 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size
static const std::array<u8, PAGE_SIZE> zeros = {};
while (remaining_size > 0) {
- const size_t copy_amount = std::min(PAGE_SIZE - page_offset, remaining_size);
+ const size_t copy_amount =
+ std::min(static_cast<size_t>(PAGE_SIZE) - page_offset, remaining_size);
const VAddr current_vaddr = static_cast<VAddr>((page_index << PAGE_BITS) + page_offset);
switch (page_table.attributes[page_index]) {
@@ -587,7 +590,8 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr,
size_t page_offset = src_addr & PAGE_MASK;
while (remaining_size > 0) {
- const size_t copy_amount = std::min(PAGE_SIZE - page_offset, remaining_size);
+ const size_t copy_amount =
+ std::min(static_cast<size_t>(PAGE_SIZE) - page_offset, remaining_size);
const VAddr current_vaddr = static_cast<VAddr>((page_index << PAGE_BITS) + page_offset);
switch (page_table.attributes[page_index]) {