summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
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:
116 */ 116 */
117 u8* GetPointer(VAddr vaddr); 117 u8* GetPointer(VAddr vaddr);
118 118
119 template <typename T>
120 T* GetPointer(VAddr vaddr) {
121 return reinterpret_cast<T*>(GetPointer(vaddr));
122 }
123
119 /** 124 /**
120 * Gets a pointer to the given address. 125 * Gets a pointer to the given address.
121 * 126 *
@@ -126,6 +131,11 @@ public:
126 */ 131 */
127 const u8* GetPointer(VAddr vaddr) const; 132 const u8* GetPointer(VAddr vaddr) const;
128 133
134 template <typename T>
135 const T* GetPointer(VAddr vaddr) const {
136 return reinterpret_cast<T*>(GetPointer(vaddr));
137 }
138
129 /** 139 /**
130 * Reads an 8-bit unsigned value from the current process' address space 140 * Reads an 8-bit unsigned value from the current process' address space
131 * at the given virtual address. 141 * at the given virtual address.