A bit more GetPointer cleanup.

Probably not worth it for performance reasons, but some semantic cleanup
is good, especially the accidental GetPointer -> writable casts without
using GetPointerWrite.

Using Unchecked on already checked pointers, or when we'd crash anyway
if it returned nullptr, is good for clarity.
This commit is contained in:
Henrik Rydgård committed 2023-01-10 12:13:47 +01:00
1 parent 70e149e3ca
commit e1a48d74c4
11 files changed
+42 -26

No files matched your search

+1 -1
View File
@@ -402,7 +402,7 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm
}
}
const u8 *checkp = Memory::GetPointer(addr);
const u8 *checkp = Memory::GetPointerUnchecked(addr);
if (reduceHash_) {
reduceHashSize = LookupReduceHashRange(w, h);
// default to reduceHashGlobalValue which default is 0.5