aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/shared_memory.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-19 09:05:04 -0500
committerLioncash <mathew1800@gmail.com>2018-11-19 09:20:29 -0500
commit233e495c1411a813460ce71efb7be69ff73649ee (patch)
tree779b543b44f0f5ed7a2515d0d54e0d2082047253 /src/core/hle/kernel/shared_memory.h
parentfb5d4b17de035e3682e64513ae7612f40afd01bd (diff)
kernel/shared_memory: Make Map() and Unmap() take the target process by reference rather than as a pointer
Both member functions assume the passed in target process will not be null. Instead of making this assumption implicit, we can change the functions to be references and enforce this at the type-system level.
Diffstat (limited to 'src/core/hle/kernel/shared_memory.h')
-rw-r--r--src/core/hle/kernel/shared_memory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h
index f3b05e48b..0b48db699 100644
--- a/src/core/hle/kernel/shared_memory.h
+++ b/src/core/hle/kernel/shared_memory.h
@@ -99,16 +99,16 @@ public:
* @param permissions Memory block map permissions (specified by SVC field)
* @param other_permissions Memory block map other permissions (specified by SVC field)
*/
- ResultCode Map(Process* target_process, VAddr address, MemoryPermission permissions,
+ ResultCode Map(Process& target_process, VAddr address, MemoryPermission permissions,
MemoryPermission other_permissions);
/**
* Unmaps a shared memory block from the specified address in system memory
- * @param target_process Process from which to umap the memory block.
+ * @param target_process Process from which to unmap the memory block.
* @param address Address in system memory where the shared memory block is mapped
* @return Result code of the unmap operation
*/
- ResultCode Unmap(Process* target_process, VAddr address);
+ ResultCode Unmap(Process& target_process, VAddr address);
/**
* Gets a pointer to the shared memory block