mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 01:29:41 +01:00
Split GetPointer into two versions, to help with const correctness
This commit is contained in:
1 parent
d2a3918f5f
commit
e6403d7157
43 files changed
+169
-156
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user