[vlc-commits] cast: use reinterpret_cast<> instead of C cast in C++ code

Steve Lhomme git at videolan.org
Mon Dec 21 13:41:52 CET 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Dec 21 10:15:25 2015 +0100| [1b68aed01062ba2e50a0f5266f754c57dc86accb] | committer: Jean-Baptiste Kempf

cast: use reinterpret_cast<> instead of C cast in C++ code

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_out/chromecast/cast.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 31f0b6a..5fde6f6 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -186,7 +186,7 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
  *****************************************************************************/
 static int Open(vlc_object_t *p_this)
 {
-    sout_stream_t *p_stream = (sout_stream_t*)p_this;
+    sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
     sout_stream_sys_t *p_sys;
     p_sys = new(std::nothrow) sout_stream_sys_t;
     if (p_sys == NULL)
@@ -299,7 +299,7 @@ static int Open(vlc_object_t *p_this)
  *****************************************************************************/
 static void Close(vlc_object_t *p_this)
 {
-    sout_stream_t *p_stream = (sout_stream_t *)p_this;
+    sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
     sout_stream_sys_t *p_sys = p_stream->p_sys;
 
     vlc_cancel(p_sys->chromecastThread);
@@ -896,7 +896,7 @@ static void* chromecastThread(void* p_data)
 {
     int canc = vlc_savecancel();
     // Not cancellation-safe part.
-    sout_stream_t* p_stream = (sout_stream_t*)p_data;
+    sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_data);
     sout_stream_sys_t* p_sys = p_stream->p_sys;
 
     unsigned i_received = 0;



More information about the vlc-commits mailing list