diff options
Diffstat (limited to 'src/core/memory_hook.h')
| -rw-r--r-- | src/core/memory_hook.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/memory_hook.h b/src/core/memory_hook.h index 0269c7ff1..940777107 100644 --- a/src/core/memory_hook.h +++ b/src/core/memory_hook.h | |||
| @@ -5,7 +5,8 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <boost/optional.hpp> | 8 | #include <optional> |
| 9 | |||
| 9 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 10 | 11 | ||
| 11 | namespace Memory { | 12 | namespace Memory { |
| @@ -18,19 +19,19 @@ namespace Memory { | |||
| 18 | * | 19 | * |
| 19 | * A hook may be mapped to multiple regions of memory. | 20 | * A hook may be mapped to multiple regions of memory. |
| 20 | * | 21 | * |
| 21 | * If a boost::none or false is returned from a function, the read/write request is passed through | 22 | * If a std::nullopt or false is returned from a function, the read/write request is passed through |
| 22 | * to the underlying memory region. | 23 | * to the underlying memory region. |
| 23 | */ | 24 | */ |
| 24 | class MemoryHook { | 25 | class MemoryHook { |
| 25 | public: | 26 | public: |
| 26 | virtual ~MemoryHook(); | 27 | virtual ~MemoryHook(); |
| 27 | 28 | ||
| 28 | virtual boost::optional<bool> IsValidAddress(VAddr addr) = 0; | 29 | virtual std::optional<bool> IsValidAddress(VAddr addr) = 0; |
| 29 | 30 | ||
| 30 | virtual boost::optional<u8> Read8(VAddr addr) = 0; | 31 | virtual std::optional<u8> Read8(VAddr addr) = 0; |
| 31 | virtual boost::optional<u16> Read16(VAddr addr) = 0; | 32 | virtual std::optional<u16> Read16(VAddr addr) = 0; |
| 32 | virtual boost::optional<u32> Read32(VAddr addr) = 0; | 33 | virtual std::optional<u32> Read32(VAddr addr) = 0; |
| 33 | virtual boost::optional<u64> Read64(VAddr addr) = 0; | 34 | virtual std::optional<u64> Read64(VAddr addr) = 0; |
| 34 | 35 | ||
| 35 | virtual bool ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) = 0; | 36 | virtual bool ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) = 0; |
| 36 | 37 | ||