mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-22 16:30:57 +01:00
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
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ VMAPermission SharedMemory::ConvertPermissions(MemoryPermission permission) {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
* @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
|
||||
*/
|
||||
u8* GetPointer(u32 offset = 0);
|
||||
u8* GetPointer(std::size_t offset = 0);
|
||||
|
||||
private:
|
||||
explicit SharedMemory(KernelCore& kernel);
|
||||
|
|
Loading…
Reference in a new issue