[N-Rage] fixed ARRAYSIZE() #define when missing headers
The old code only cared about if the macro was already defined (then #undef and re-define it). If it was NOT already defined, it just ignored the problem and causes unresolved compile-time symbols.
This commit is contained in:
parent
61866f5b04
commit
0e67591be6
|
@ -42,7 +42,8 @@
|
|||
|
||||
#ifdef ARRAYSIZE
|
||||
#undef ARRAYSIZE
|
||||
#define ARRAYSIZE( array ) (sizeof(array) / sizeof(array[0]))
|
||||
#endif //ARRAYSIZE
|
||||
|
||||
#define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
#endif // #ifndef _COMMONINCLUDES_H_
|
||||
|
|
Loading…
Reference in New Issue