mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-07 01:56:23 +00:00
Jit64: Avoid pointer casts if possible.
This commit is contained in:
parent
f325d41def
commit
21f3e97435
7 changed files with 20 additions and 22 deletions
|
@ -324,7 +324,7 @@ inline OpArg ImmPtr(const void* imm)
|
|||
return Imm64((u64)imm);
|
||||
}
|
||||
|
||||
inline u32 PtrOffset(const void* ptr, const void* base)
|
||||
inline u32 PtrOffset(const void* ptr, const void* base = nullptr)
|
||||
{
|
||||
s64 distance = (s64)ptr - (s64)base;
|
||||
if (distance >= 0x80000000LL || distance < -0x80000000LL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue