[vlc-devel] [PATCH 1/7] gui/qt: VideoWidget::nativeEvent: prefer static_cast

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


Given that message is of type pointer-to-void, a static_cast is
enough.
---
 modules/gui/qt/components/interface_widgets.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index b3b9b28b25..60dcb1b30a 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -265,7 +265,7 @@ bool VideoWidget::nativeEvent( const QByteArray& eventType, void* message, long*
 #if defined(QT5_HAS_XCB)
     if ( eventType == "xcb_generic_event_t" )
     {
-        const xcb_generic_event_t* xev = reinterpret_cast<const xcb_generic_event_t*>( message );
+        const xcb_generic_event_t* xev = static_cast<const xcb_generic_event_t*>( message );
 
         if ( xev->response_type == XCB_CONFIGURE_NOTIFY )
             reportSize();
-- 
2.12.2


More information about the vlc-devel mailing list