diff options
author | Chris Robinson <[email protected]> | 2012-02-19 12:07:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-19 12:07:40 -0800 |
commit | 4a65747a4b20cbbfb2627bf10ded6f5b897cb908 (patch) | |
tree | 9a8c3bc309514340dd8795db8904fe51fd8d3803 /OpenAL32/Include | |
parent | 6dc194ed1defc358c9ed4ee8a67db71f5c040766 (diff) |
Add a COUNTOF macro to get the number of entries in a static array
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 |