From 7a5eda59146306dedaf3e6f07f97a8c6898543dd Mon Sep 17 00:00:00 2001 From: Frederic L Date: Tue, 30 Oct 2018 05:03:25 +0100 Subject: global: Use std::optional instead of boost::optional (#1578) * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build --- src/core/memory_hook.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/core/memory_hook.h') 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 @@ #pragma once #include -#include +#include + #include "common/common_types.h" namespace Memory { @@ -18,19 +19,19 @@ namespace Memory { * * A hook may be mapped to multiple regions of memory. * - * If a boost::none or false is returned from a function, the read/write request is passed through + * If a std::nullopt or false is returned from a function, the read/write request is passed through * to the underlying memory region. */ class MemoryHook { public: virtual ~MemoryHook(); - virtual boost::optional IsValidAddress(VAddr addr) = 0; + virtual std::optional IsValidAddress(VAddr addr) = 0; - virtual boost::optional Read8(VAddr addr) = 0; - virtual boost::optional Read16(VAddr addr) = 0; - virtual boost::optional Read32(VAddr addr) = 0; - virtual boost::optional Read64(VAddr addr) = 0; + virtual std::optional Read8(VAddr addr) = 0; + virtual std::optional Read16(VAddr addr) = 0; + virtual std::optional Read32(VAddr addr) = 0; + virtual std::optional Read64(VAddr addr) = 0; virtual bool ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) = 0; -- cgit v1.2.3