diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/global.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h index 16f08c895..14377d8bb 100644 --- a/include/global.h +++ b/include/global.h @@ -32,6 +32,10 @@ #define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0])) +// GameFreak used a macro called "NELEMS", as evidenced by +// AgbAssert calls. +#define NELEMS(arr) (sizeof(arr)/sizeof(*(arr))) + #define SWAP(a, b, temp) \ { \ temp = a; \ |