[vlc-commits] gui/qt: ActionsManager::isItemSout: prefer static_cast

Filip Roséen git at videolan.org
Thu May 18 21:08:22 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:02:19 2017 +0200| [2e2705bcf4bad67c25f153ce11700f22b8c58308] | committer: Jean-Baptiste Kempf

gui/qt: ActionsManager::isItemSout: 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=2e2705bcf4bad67c25f153ce11700f22b8c58308
---

 modules/gui/qt/actions_manager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/actions_manager.cpp b/modules/gui/qt/actions_manager.cpp
index 2986f05d68..a884ce52c5 100644
--- a/modules/gui/qt/actions_manager.cpp
+++ b/modules/gui/qt/actions_manager.cpp
@@ -235,7 +235,7 @@ bool ActionsManager::isItemSout( QVariant & m_obj, const char *psz_sout, bool as
 void ActionsManager::renderer_event_item_added(
     vlc_renderer_discovery_t *rd, vlc_renderer_item_t *p_item )
 {
-    intf_thread_t *p_intf = reinterpret_cast<intf_thread_t*>(rd->owner.sys);
+    intf_thread_t *p_intf = static_cast<intf_thread_t*>(rd->owner.sys);
     QAction *firstSeparator = NULL;
 
     foreach (QAction* action, VLCMenuBar::rendererMenu->actions())



More information about the vlc-commits mailing list