summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-02-27 20:48:35 +0100
committerGitHub <noreply@github.com>2021-02-27 20:48:35 +0100
commit09f7c355c6d7e3c7845ba96d9704489d2d5853f4 (patch)
treeb12127263c0e4999f0a6e9edfe7f8f25adef9d37 /src/core/memory.h
parentMerge pull request #5944 from Morph1984/gc-vibrations (diff)
parenthle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable. (diff)
downloadyuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.gz
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.bz2
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.lz
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.xz
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.zst
yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.zip
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index 705ebb23d..6d34fcfe2 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -116,6 +116,11 @@ public:
*/
u8* GetPointer(VAddr vaddr);
+ template <typename T>
+ T* GetPointer(VAddr vaddr) {
+ return reinterpret_cast<T*>(GetPointer(vaddr));
+ }
+
/**
* Gets a pointer to the given address.
*
@@ -126,6 +131,11 @@ public:
*/
const u8* GetPointer(VAddr vaddr) const;
+ template <typename T>
+ const T* GetPointer(VAddr vaddr) const {
+ return reinterpret_cast<T*>(GetPointer(vaddr));
+ }
+
/**
* Reads an 8-bit unsigned value from the current process' address space
* at the given virtual address.