[vlc-commits] demux/adaptive: PlaylistManager: prefer static_cast
Filip Roséen
git at videolan.org
Thu May 18 21:08:01 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:02:14 2017 +0200| [8546ff80e0a7f428329f587bd3e5dad6277b5ff1] | committer: Jean-Baptiste Kempf
demux/adaptive: PlaylistManager: 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=8546ff80e0a7f428329f587bd3e5dad6277b5ff1
---
modules/demux/adaptive/PlaylistManager.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 7180b66a12..8fcb53edad 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -163,7 +163,7 @@ bool PlaylistManager::start()
updateControlsPosition();
b_thread = !vlc_clone(&thread, managerThread,
- reinterpret_cast<void *>(this), VLC_THREAD_PRIORITY_INPUT);
+ static_cast<void *>(this), VLC_THREAD_PRIORITY_INPUT);
if(!b_thread)
return false;
@@ -674,7 +674,7 @@ void PlaylistManager::Run()
void * PlaylistManager::managerThread(void *opaque)
{
- (reinterpret_cast<PlaylistManager *>(opaque))->Run();
+ static_cast<PlaylistManager *>(opaque)->Run();
return NULL;
}
More information about the vlc-commits
mailing list