[Base] Make MappedMemory non-copyable

This commit is contained in:
Triang3l 2022-07-14 22:04:06 +03:00
parent 2a69d1db4d
commit 9fd63519bf
1 changed files with 4 additions and 0 deletions

View File

@ -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<MappedMemory> Slice(Mode mode, size_t offset, size_t length) {