[vlc-devel] [PATCH 6/7] gui/qt: VideoWidget::request: prefer static_cast

Filip Roséen filip at atch.se
Thu May 18 12:02:18 CEST 2017


There is no need to use reinterpret_cast when the source or
destination type is pointer-to-void, static_cast is more accurate (and
safer).
---
 modules/gui/qt/components/interface_widgets.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 60dcb1b30a..0f3dd29848 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -170,10 +170,10 @@ bool VideoWidget::request( struct vout_window_t *p_wnd )
             QPlatformNativeInterface *qni = qApp->platformNativeInterface();
             assert(qni != NULL);
 
-            p_wnd->handle.wl = reinterpret_cast<wl_surface*>(
+            p_wnd->handle.wl = static_cast<wl_surface*>(
                 qni->nativeResourceForWindow(QByteArrayLiteral("surface"),
                                              window));
-            p_wnd->display.wl = reinterpret_cast<wl_display*>(
+            p_wnd->display.wl = static_cast<wl_display*>(
                 qni->nativeResourceForIntegration(QByteArrayLiteral("wl_display")));
             break;
         }
-- 
2.12.2


More information about the vlc-devel mailing list