mesa: use C99 initializer in get_gl_override()
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 24 Aug 2018 13:05:57 +0000 (14:05 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 3 Oct 2018 12:38:05 +0000 (13:38 +0100)
The overrides array contains entries indexed on the gl_api enum.
Use a C99 initializer to make it a bit more obvious.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/mesa/main/version.c

index 77ff51b6d9e66ef43a6ca346681e47bc86e29345..610ba2f08c54c275eb2a9faea204d65ae7c5bb5d 100644 (file)
@@ -64,10 +64,10 @@ get_gl_override(gl_api api, int *version, bool *fwd_context,
       bool fc_suffix;
       bool compat_suffix;
    } override[] = {
-      { -1, false, false},
-      { -1, false, false},
-      { -1, false, false},
-      { -1, false, false},
+      [API_OPENGL_COMPAT] = { -1, false, false},
+      [API_OPENGLES]      = { -1, false, false},
+      [API_OPENGLES2]     = { -1, false, false},
+      [API_OPENGL_CORE]   = { -1, false, false},
    };
 
    STATIC_ASSERT(ARRAY_SIZE(override) == API_OPENGL_LAST + 1);