From 9fd63519bf05762f89aeb0f2942d5e441d54192e Mon Sep 17 00:00:00 2001 From: Triang3l Date: Thu, 14 Jul 2022 22:04:06 +0300 Subject: [PATCH] [Base] Make MappedMemory non-copyable --- src/xenia/base/mapped_memory.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/base/mapped_memory.h b/src/xenia/base/mapped_memory.h index 203c439180..6a58ab4c46 100644 --- a/src/xenia/base/mapped_memory.h +++ b/src/xenia/base/mapped_memory.h @@ -32,6 +32,10 @@ class MappedMemory { MappedMemory(const std::filesystem::path& path, Mode mode, void* data, size_t size) : path_(path), mode_(mode), data_(data), size_(size) {} + MappedMemory(const MappedMemory& mapped_memory) = delete; + MappedMemory& operator=(const MappedMemory& mapped_memory) = delete; + MappedMemory(MappedMemory&& mapped_memory) = delete; + MappedMemory& operator=(MappedMemory&& mapped_memory) = delete; virtual ~MappedMemory() = default; std::unique_ptr Slice(Mode mode, size_t offset, size_t length) {