summaryrefslogtreecommitdiff
path: root/src/common/virtual_buffer.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-11-17 19:58:41 -0500
committerGravatar Lioncash2020-11-17 20:08:20 -0500
commitb3c8997829ed986c948d195bc1e7c8f66c42755e (patch)
tree9be666d43f15154ee3df2001ced3972cc31a99d7 /src/common/virtual_buffer.cpp
parentpage_table: Add missing doxygen parameters to Resize() (diff)
downloadyuzu-b3c8997829ed986c948d195bc1e7c8f66c42755e.tar.gz
yuzu-b3c8997829ed986c948d195bc1e7c8f66c42755e.tar.xz
yuzu-b3c8997829ed986c948d195bc1e7c8f66c42755e.zip
page_table: Allow page tables to be moved
Makes page tables and virtual buffers able to be moved, but not copied, making the interface more flexible. Previously, with the destructor specified, but no move assignment or constructor specified, they wouldn't be implicitly generated.
Diffstat (limited to 'src/common/virtual_buffer.cpp')
-rw-r--r--src/common/virtual_buffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/virtual_buffer.cpp b/src/common/virtual_buffer.cpp
index b009cb500..e3ca29258 100644
--- a/src/common/virtual_buffer.cpp
+++ b/src/common/virtual_buffer.cpp
@@ -13,7 +13,7 @@
13 13
14namespace Common { 14namespace Common {
15 15
16void* AllocateMemoryPages(std::size_t size) { 16void* AllocateMemoryPages(std::size_t size) noexcept {
17#ifdef _WIN32 17#ifdef _WIN32
18 void* base{VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE)}; 18 void* base{VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE)};
19#else 19#else
@@ -29,7 +29,7 @@ void* AllocateMemoryPages(std::size_t size) {
29 return base; 29 return base;
30} 30}
31 31
32void FreeMemoryPages(void* base, [[maybe_unused]] std::size_t size) { 32void FreeMemoryPages(void* base, [[maybe_unused]] std::size_t size) noexcept {
33 if (!base) { 33 if (!base) {
34 return; 34 return;
35 } 35 }