Split GetPointer into two versions, to help with const correctness

This commit is contained in:
Henrik Rydgård committed 2022-07-24 13:26:19 +02:00
1 parent d2a3918f5f
commit e6403d7157
43 files changed
+169 -156

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ static u32 sceMt19937Init(u32 mt19937Addr, u32 seed)
{
if (!Memory::IsValidAddress(mt19937Addr))
return hleLogError(HLE, -1);
void *ptr = Memory::GetPointer(mt19937Addr);
void *ptr = Memory::GetPointerWriteUnchecked(mt19937Addr);
// This is made to match the memory layout of a PSP MT structure exactly.
// Let's just construct it in place with placement new. Elite C++ hackery FTW.
new (ptr) MersenneTwister(seed);