From d4c1b9d311c978a6354574d09c451522ceb74e82 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Dec 2018 10:59:22 -0500 Subject: vm_manager: Make vma_map private This was only ever public so that code could check whether or not a handle was valid or not. Instead of exposing the object directly and allowing external code to potentially mess with the map contents, we just provide a member function that allows checking whether or not a handle is valid. This makes all member variables of the VMManager class private except for the page table. --- src/core/hle/kernel/vm_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/hle/kernel/vm_manager.cpp') diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 100f8f6bf..6187993ce 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -87,6 +87,10 @@ VMManager::VMAHandle VMManager::FindVMA(VAddr target) const { } } +bool VMManager::IsValidHandle(VMAHandle handle) const { + return handle != vma_map.cend(); +} + ResultVal VMManager::MapMemoryBlock(VAddr target, std::shared_ptr> block, std::size_t offset, u64 size, -- cgit v1.2.3