mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Use __builtin_offsetof
for non IDO builds (#1140)
* Add offsetof macro * Change old uses of OFFSETOF with offsetof
This commit is contained in:
parent
ed0daabf98
commit
2191c8b0a0
5 changed files with 18 additions and 11 deletions
|
@ -8,8 +8,6 @@
|
|||
#define VIRTUAL_TO_PHYSICAL(addr) (u32)((u8*)(addr) - 0x80000000)
|
||||
#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr))
|
||||
|
||||
#define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member))
|
||||
|
||||
#define SQ(x) ((x)*(x))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue