diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-09-04 07:56:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-04 17:56:59 +0300 |
| commit | b45a089e15d79821b07be020db628e01a49b1fd2 (patch) | |
| tree | 948057548cc19b19d644bd4f300ca6434e6bff11 /include/JSystem/JSupport | |
| parent | ee8b843996f4d888903f8c125b95ec1af376877e (diff) | |
some J3D/misc cleanup (#2628)
* some j3d cleanup
* begin using uintptr_t
* j3dgraphbase cleanup
* j3dgraphanimator cleanup
Diffstat (limited to 'include/JSystem/JSupport')
| -rw-r--r-- | include/JSystem/JSupport/JSupport.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h index c4a47c61a9..b3bb337951 100644 --- a/include/JSystem/JSupport/JSupport.h +++ b/include/JSystem/JSupport/JSupport.h @@ -2,17 +2,18 @@ #define JSUPPORT_H #include <dolphin.h> +#include <stdint.h> /** * @ingroup jsystem-jsupport * */ template <typename T> -T* JSUConvertOffsetToPtr(const void* ptr, u32 offset) { +T* JSUConvertOffsetToPtr(const void* ptr, uintptr_t offset) { if (offset == 0) { return NULL; } else { - return (T*)((s32)ptr + (s32)offset); + return (T*)((intptr_t)ptr + (intptr_t)offset); } } @@ -25,7 +26,7 @@ T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) { if (offset == NULL) { return NULL; } else { - return (T*)((s32)ptr + (s32)offset); + return (T*)((intptr_t)ptr + (intptr_t)offset); } } |
