Mercurial > minori
comparison include/core/array.h @ 20:8a4122caaf2f
*: redefine ARRAYSIZE on platforms that don't include it
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 19 Sep 2023 23:18:15 -0400 |
parents | d05b1be2f3a6 |
children | 329b7921a6be |
comparison
equal
deleted
inserted
replaced
19:d05b1be2f3a6 | 20:8a4122caaf2f |
---|---|
1 #ifndef __core__array_h | 1 #ifndef __core__array_h |
2 #define __core__array_h | 2 #define __core__array_h |
3 | 3 |
4 #ifndef ARRAYSIZE | |
4 #define ARRAYSIZE(x) \ | 5 #define ARRAYSIZE(x) \ |
5 (x / x[0]) | 6 (sizeof(x) / sizeof(x[0])) |
7 #endif | |
6 | 8 |
7 #endif // __core__array_h | 9 #endif // __core__array_h |