[Mesa-dev] [PATCH 1/4] mesa: use C99 initializer in get_gl_override()
Eric Engestrom
eric.engestrom at intel.com
Tue Aug 28 13:27:52 UTC 2018
On Friday, 2018-08-24 14:05:57 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> 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 at collabora.com>
Patches 1-3 are:
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Patch 4 look good code-wise, but I don't know if it's a good idea or
not, so I abstain.
> ---
> src/mesa/main/version.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
> index 77ff51b6d9e..610ba2f08c5 100644
> --- a/src/mesa/main/version.c
> +++ b/src/mesa/main/version.c
> @@ -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);
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list