Use macro from util.h for static array size

This commit is contained in:
Jonas Kulla 2014-07-23 21:26:44 +02:00
parent f73b0ba4b5
commit 7b947a50c9
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
*/
#include "vertex.h"
#include "util.h"
#include <cstddef>
@ -56,7 +57,7 @@ static const VertexAttribute VertexAttribs[] =
template<> \
const VertexAttribute *VertexTraits<VertType>::attr = VertType##Attribs; \
template<> \
const GLsizei VertexTraits<VertType>::attrCount = sizeof(VertType##Attribs) / sizeof(VertType##Attribs[0])
const GLsizei VertexTraits<VertType>::attrCount = ARRAY_SIZE(VertType##Attribs)
DEF_TRAITS(SVertex);
DEF_TRAITS(CVertex);