kernel/shared_memory: Make GetPointer() take a std::size_t instead of a u32
Makes the interface nicer to use in terms of 64-bit code, as it makes it less likely for one to get truncation warnings (and also makes sense in the context of the rest of the interface where 64-bit types are used for sizes and offsets
This commit is contained in:
parent
f472232705
commit
76ac234bf6
|
@ -132,7 +132,7 @@ VMAPermission SharedMemory::ConvertPermissions(MemoryPermission permission) {
|
||||||
return static_cast<VMAPermission>(masked_permissions);
|
return static_cast<VMAPermission>(masked_permissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8* SharedMemory::GetPointer(u32 offset) {
|
u8* SharedMemory::GetPointer(std::size_t offset) {
|
||||||
return backing_block->data() + backing_block_offset + offset;
|
return backing_block->data() + backing_block_offset + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ public:
|
||||||
* @param offset Offset from the start of the shared memory block to get pointer
|
* @param offset Offset from the start of the shared memory block to get pointer
|
||||||
* @return Pointer to the shared memory block from the specified offset
|
* @return Pointer to the shared memory block from the specified offset
|
||||||
*/
|
*/
|
||||||
u8* GetPointer(u32 offset = 0);
|
u8* GetPointer(std::size_t offset = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit SharedMemory(KernelCore& kernel);
|
explicit SharedMemory(KernelCore& kernel);
|
||||||
|
|
Reference in New Issue