[vlc-commits] gui/qt: VideoWidget::request: prefer static_cast
Filip Roséen
git at videolan.org
Thu May 18 21:08:17 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:02:18 2017 +0200| [4adac0c3329e8bf7a620e0c88c3acc980af66eb0] | committer: Jean-Baptiste Kempf
gui/qt: VideoWidget::request: prefer static_cast
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).
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4adac0c3329e8bf7a620e0c88c3acc980af66eb0
---
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;
}
More information about the vlc-commits
mailing list