From 326e7c70208865b013e138972b25687d805488d0 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Wed, 21 Jun 2017 20:21:49 -0700 Subject: Memory: Make PhysicalToVirtualAddress return a boost::optional And fix a few places in the code to take advantage of that. --- src/core/memory.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/memory.h') diff --git a/src/core/memory.h b/src/core/memory.h index 71fb278ad..77277c342 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "common/common_types.h" namespace Memory { @@ -154,9 +155,9 @@ std::string ReadCString(VAddr virtual_address, std::size_t max_length); PAddr VirtualToPhysicalAddress(VAddr addr); /** -* Undoes a mapping performed by VirtualToPhysicalAddress(). -*/ -VAddr PhysicalToVirtualAddress(PAddr addr); + * Undoes a mapping performed by VirtualToPhysicalAddress(). + */ +boost::optional PhysicalToVirtualAddress(PAddr addr); /** * Gets a pointer to the memory region beginning at the specified physical address. -- cgit v1.2.3