XECOUNT to countof.

This commit is contained in:
Ben Vanik
2014-08-16 17:58:33 -07:00
parent 187d0ad277
commit f2a9fa3bf9
30 changed files with 195 additions and 175 deletions

View File

@@ -82,15 +82,6 @@
#endif // MSVC
typedef XECACHEALIGN volatile void xe_aligned_void_t;
#if XE_COMPILER_MSVC
// http://msdn.microsoft.com/en-us/library/ms175773.aspx
#define XECOUNT(array) _countof(array)
#elif XE_COMPILER_GNUC
#define XECOUNT(array) (sizeof(array) / sizeof(__typeof__(array[0])))
#else
#define XECOUNT(array) (sizeof(array) / sizeof(array[0]))
#endif // MSVC
#define XEFAIL() goto XECLEANUP
#define XEEXPECT(expr) if (!(expr) ) { goto XECLEANUP; }
#define XEEXPECTTRUE(expr) if (!(expr) ) { goto XECLEANUP; }