From 766f5cf8f88c08a7673beb492095ad8ca878bc22 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 28 Feb 2015 08:57:15 -0700 Subject: mesa/vbo: replace Elements() with ARRAY_SIZE() Acked-by: Ilia Mirkin --- src/mesa/vbo/vbo_exec_draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/vbo/vbo_exec_draw.c') diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index ec44fdb975d..fa5eba9212f 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -172,7 +172,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr]; } for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) { - assert(VERT_ATTRIB_GENERIC(attr) < Elements(exec->vtx.inputs)); + assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs)); exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT+attr]; } @@ -183,7 +183,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr]; } for (attr = 0; attr < VERT_ATTRIB_GENERIC_MAX; attr++) { - assert(VERT_ATTRIB_GENERIC(attr) < Elements(exec->vtx.inputs)); + assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs)); exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->currval[VBO_ATTRIB_GENERIC0+attr]; } @@ -213,8 +213,8 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) (GLbyte *)exec->vtx.vertex; /* override the default array set above */ - assert(attr < Elements(exec->vtx.inputs)); - assert(attr < Elements(exec->vtx.arrays)); /* arrays[] */ + assert(attr < ARRAY_SIZE(exec->vtx.inputs)); + assert(attr < ARRAY_SIZE(exec->vtx.arrays)); /* arrays[] */ exec->vtx.inputs[attr] = &arrays[attr]; if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { -- cgit v1.2.3