egl: use designated initaliser for _eglGlobal
authorEric Engestrom <eric@engestrom.ch>
Sun, 30 Jul 2017 01:11:57 +0000 (02:11 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 1 Aug 2017 16:43:06 +0000 (17:43 +0100)
Turn comments into actual code, that the compiler can check for us :)
(Speaking of, one of the comments had a typo. Challenge: find it)

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/main/eglglobals.c

index 90712266189bbda8786334c719da8841d2d091fb..c506bd6a9db3f3a9c8ca8bfba460fbee67865ec2 100644 (file)
@@ -49,22 +49,22 @@ static mtx_t _eglGlobalMutex = _MTX_INITIALIZER_NP;
 
 struct _egl_global _eglGlobal =
 {
-   &_eglGlobalMutex,       /* Mutex */
-   NULL,                   /* DisplayList */
-   2,                      /* NumAtExitCalls */
-   {
+   .Mutex = &_eglGlobalMutex,
+   .DisplayList = NULL,
+   .NumAtExitCalls = 2,
+   .AtExitCalls = {
       /* default AtExitCalls, called in reverse order */
       _eglUnloadDrivers, /* always called last */
       _eglFiniDisplay
    },
 
-   /* ClientOnlyExtensionString */
+   .ClientOnlyExtensionString =
    "EGL_EXT_client_extensions"
    " EGL_EXT_platform_base"
    " EGL_KHR_client_get_all_proc_addresses"
    " EGL_KHR_debug",
 
-   /* PlatformExtensionString */
+   .PlatformExtensionString =
 #ifdef HAVE_WAYLAND_PLATFORM
    " EGL_EXT_platform_wayland"
 #endif
@@ -79,10 +79,10 @@ struct _egl_global _eglGlobal =
 #endif
    "",
 
-   NULL, /* ClientExtensionsString */
+   .ClientExtensionString = NULL,
 
-   NULL, /* debugCallback */
-   _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR, /* debugTypesEnabled */
+   .debugCallback = NULL,
+   .debugTypesEnabled = _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR,
 };