[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:
unknown 2015-11-16 18:30:11 -05:00
parent 61866f5b04
commit 0e67591be6
1 changed files with 3 additions and 2 deletions

View File

@ -42,7 +42,8 @@
#ifdef ARRAYSIZE
#undef ARRAYSIZE
#define ARRAYSIZE( array ) (sizeof(array) / sizeof(array[0]))
#endif //ARRAYSIZE
#endif //ARRAYSIZE
#define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0]))
#endif // #ifndef _COMMONINCLUDES_H_