CodeBlock: Const correctness for IsInSpace

This commit is contained in:
Lioncash 2017-01-08 18:05:28 -05:00
parent 5135445298
commit 00baf193ac
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public:
} }
} }
bool IsInSpace(u8* ptr) const { return (ptr >= region) && (ptr < (region + region_size)); } bool IsInSpace(const u8* ptr) const { return ptr >= region && ptr < (region + region_size); }
// Cannot currently be undone. Will write protect the entire code region. // Cannot currently be undone. Will write protect the entire code region.
// Start over if you need to change the code (call FreeCodeSpace(), AllocCodeSpace()). // Start over if you need to change the code (call FreeCodeSpace(), AllocCodeSpace()).
void WriteProtect() { Common::WriteProtectMemory(region, region_size, true); } void WriteProtect() { Common::WriteProtectMemory(region, region_size, true); }

View File

@ -30,7 +30,7 @@ public:
void Shutdown() override; void Shutdown() override;
JitBaseBlockCache* GetBlockCache() override { return &blocks; } JitBaseBlockCache* GetBlockCache() override { return &blocks; }
bool IsInCodeSpace(u8* ptr) const { return IsInSpace(ptr); } bool IsInCodeSpace(const u8* ptr) const { return IsInSpace(ptr); }
bool HandleFault(uintptr_t access_address, SContext* ctx) override; bool HandleFault(uintptr_t access_address, SContext* ctx) override;
void ClearCache() override; void ClearCache() override;