mesa: remove array size so the static assert can work
authorBrian Paul <brianp@vmware.com>
Sat, 27 Oct 2012 15:13:03 +0000 (09:13 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 29 Oct 2012 23:56:05 +0000 (17:56 -0600)
With the explit NUM_TEXTURE_TARGETS array size, the assertion that
Elements(targets) == NUM_TEXTURE_TARGETS would pass even if elements
were missing.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/shared.c

index fab2995a49c0a8af3ecf8a086477e7b38abc2692..2d2f7bd1d78158dd669a936dc3c9d3ceab2d059d 100644 (file)
@@ -89,7 +89,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
    /* Create default texture objects */
    for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
       /* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */
-      static const GLenum targets[NUM_TEXTURE_TARGETS] = {
+      static const GLenum targets[] = {
          GL_TEXTURE_BUFFER,
          GL_TEXTURE_2D_ARRAY_EXT,
          GL_TEXTURE_1D_ARRAY_EXT,