[vlc-commits] window: remove useless initializers

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:25:54 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct  9 19:25:03 2014 +0300| [53b1f0600ec223109dac75467844a751b8da412d] | committer: Rémi Denis-Courmont

window: remove useless initializers

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53b1f0600ec223109dac75467844a751b8da412d
---

 modules/gui/skins2/src/skin_main.cpp |    2 ++
 modules/video_output/xcb/window.c    |    1 +
 src/video_output/window.c            |    7 -------
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index caecdff..47c604e 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -380,6 +380,8 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
     CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) );
 
 #ifdef X11_SKINS
+    pWnd->display.x11 = NULL;
+
     if( !pWnd->handle.xid )
 #else
     if( !pWnd->handle.hwnd )
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 246429d..6637e07 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -566,6 +566,7 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
 
     p_sys->embedded = true;
     p_sys->keys = NULL;
+    wnd->display.x11 = NULL;
     wnd->handle.xid = window;
     wnd->control = Control;
     wnd->sys = p_sys;
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 95d7d14..7b8a715 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -68,28 +68,21 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
 #if defined(_WIN32) || defined(__OS2__)
     case VOUT_WINDOW_TYPE_HWND:
         type = "vout window hwnd";
-        window->handle.hwnd = NULL;
         break;
 #endif
 #ifdef __APPLE__
     case VOUT_WINDOW_TYPE_NSOBJECT:
         type = "vout window nsobject";
-        window->handle.nsobject = NULL;
         break;
 #endif
     case VOUT_WINDOW_TYPE_XID:
         type = "vout window xid";
-        window->handle.xid = 0;
-        window->display.x11 = NULL;
         break;
     case VOUT_WINDOW_TYPE_ANDROID_NATIVE:
         type = "vout window anative";
-        window->handle.anativewindow = NULL;
         break;
     case VOUT_WINDOW_TYPE_WAYLAND:
         type = "vout surface wl";
-        window->handle.wl = NULL;
-        window->display.wl = NULL;
         break;
     default:
         assert(0);



More information about the vlc-commits mailing list