Define DECL_VLA where it's used

This commit is contained in:
Chris Robinson
2018-01-16 12:57:06 -08:00
parent 273dca2fa0
commit bf8c889631
2 changed files with 7 additions and 6 deletions
-6
View File
@@ -173,12 +173,6 @@ typedef ALuint64SOFT ALuint64;
*/
#define FAM_SIZE(T, M, N) (offsetof(T, M) + sizeof(((T*)NULL)->M[0])*(N))
#ifdef HAVE_C99_VLA
#define DECL_VLA(T, _name, _size) T _name[(_size)]
#else
#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T))
#endif
static const union {
ALuint u;
+7
View File
@@ -15,6 +15,13 @@
#include "alBuffer.h"
#ifdef HAVE_C99_VLA
#define DECL_VLA(T, _name, _size) T _name[(_size)]
#else
#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T))
#endif
/* IMA ADPCM Stepsize table */
static const int IMAStep_size[89] = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19,