[vlc-devel] [PATCH] cast: use reinterpret_cast<> instead of C cast in C++ code
Steve Lhomme
robux4 at videolabs.io
Mon Dec 21 10:15:25 CET 2015
---
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 c83a131..dc8688b 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -199,7 +199,7 @@ static int Control(sout_stream_t *p_stream, int i_query, va_list args)
*****************************************************************************/
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)
@@ -314,7 +314,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);
@@ -911,7 +911,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;
--
2.6.3
More information about the vlc-devel
mailing list