diff options
author | Subv <subv2112@gmail.com> | 2016-04-19 21:08:02 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-05-28 20:52:49 +0200 |
commit | 660499ac01b9244301a0642f4a0209ef8309ace4 (patch) | |
tree | 372686ef656f18c9afdf80fb9599399b7b4d43e6 /src/core/memory.cpp | |
parent | SOC_U: Remove usage of GetPointer (diff) | |
download | yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar.gz yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar.bz2 yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar.lz yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar.xz yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.tar.zst yuzu-660499ac01b9244301a0642f4a0209ef8309ace4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/memory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index bf2493270..2ac3e7de4 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -364,7 +364,7 @@ u64 Read64(const VAddr addr) { return Read<u64_le>(addr); } -void ReadBlock(const VAddr src_addr, u8* dest_buffer, const size_t size) { +void ReadBlock(const VAddr src_addr, void* dest_buffer, const size_t size) { size_t remaining_size = size; size_t page_index = src_addr >> PAGE_BITS; size_t page_offset = src_addr & PAGE_MASK; @@ -398,7 +398,7 @@ void ReadBlock(const VAddr src_addr, u8* dest_buffer, const size_t size) { page_index++; page_offset = 0; - dest_buffer += copy_amount; + dest_buffer = static_cast<u8*>(dest_buffer) + copy_amount; remaining_size -= copy_amount; } } @@ -419,7 +419,7 @@ void Write64(const VAddr addr, const u64 data) { Write<u64_le>(addr, data); } -void WriteBlock(const VAddr dest_addr, const u8* src_buffer, const size_t size) { +void WriteBlock(const VAddr dest_addr, const void* src_buffer, const size_t size) { size_t remaining_size = size; size_t page_index = dest_addr >> PAGE_BITS; size_t page_offset = dest_addr & PAGE_MASK; @@ -452,7 +452,7 @@ void WriteBlock(const VAddr dest_addr, const u8* src_buffer, const size_t size) page_index++; page_offset = 0; - src_buffer += copy_amount; + src_buffer = static_cast<const u8*>(src_buffer) + copy_amount; remaining_size -= copy_amount; } } |