Mesa (master): egl: use designated initializers

Emil Velikov evelikov at kemper.freedesktop.org
Mon May 8 14:40:52 UTC 2017


Module: Mesa
Branch: master
Commit: f12fcb1c9dec9db5f158cc2bdaab273412006bf5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f12fcb1c9dec9db5f158cc2bdaab273412006bf5

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Fri Mar 31 12:08:38 2017 +0100

egl: use designated initializers

All the compilers used to build Mesa support them.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Chad Versace <chadversary at chromium.org>

---

 src/egl/main/egllog.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c
index 7af381830e..bf0ee017b8 100644
--- a/src/egl/main/egllog.c
+++ b/src/egl/main/egllog.c
@@ -72,17 +72,16 @@ static struct {
    EGLBoolean initialized;
    EGLint level;
 } logging = {
-   _MTX_INITIALIZER_NP,
-   EGL_FALSE,
-   FALLBACK_LOG_LEVEL,
+   .mutex = _MTX_INITIALIZER_NP,
+   .initialized = EGL_FALSE,
+   .level = FALLBACK_LOG_LEVEL,
 };
 
 static const char *level_strings[] = {
-   /* the order is important */
-   "fatal",
-   "warning",
-   "info",
-   "debug",
+   [_EGL_FATAL] = "fatal",
+   [_EGL_WARNING]  = "warning",
+   [_EGL_INFO] = "info",
+   [_EGL_DEBUG] = "debug",
 };
 
 




More information about the mesa-commit mailing list