From 4a65747a4b20cbbfb2627bf10ded6f5b897cb908 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 19 Feb 2012 12:07:40 -0800 Subject: Add a COUNTOF macro to get the number of entries in a static array --- OpenAL32/Include/alMain.h | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 8427f83b..490721be 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -105,6 +105,7 @@ static const union { } EndianTest = { 1 }; #define IS_LITTLE_ENDIAN (EndianTest.b[0] == 1) +#define COUNTOF(x) (sizeof((x))/sizeof((x)[0])) #ifdef _WIN32 -- cgit v1.2.3