From 420ba81517f48df61ab66f5377795a5568d1f47c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:29:59 +0100 Subject: More loplugin:cstylecast: avmedia auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Id1ad7f5c7beeea0c749a2ed48dedd03c50945b80 --- avmedia/source/gstreamer/gstplayer.cxx | 8 ++++---- avmedia/source/vlc/wrapper/Player.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 64c55dbc880e..598e7f6ea4c1 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -477,7 +477,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) #endif { SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " processSyncMessage prepare window id: " << - GST_MESSAGE_TYPE_NAME( message ) << " " << (int)mnWindowID ); + GST_MESSAGE_TYPE_NAME( message ) << " " << static_cast(mnWindowID) ); if( mpXOverlay ) g_object_unref( G_OBJECT ( mpXOverlay ) ); g_object_set( GST_MESSAGE_SRC( message ), "force-aspect-ratio", FALSE, nullptr ); @@ -496,7 +496,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) gst_message_parse_state_changed (message, nullptr, &newstate, &pendingstate); - SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " state change received, new state " << (int)newstate << " pending " << (int)pendingstate ); + SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " state change received, new state " << static_cast(newstate) << " pending " << static_cast(pendingstate) ); if( newstate == GST_STATE_PAUSED && pendingstate == GST_STATE_VOID_PENDING ) { @@ -852,7 +852,7 @@ sal_Int16 SAL_CALL Player::getVolumeDB() g_object_get( G_OBJECT( mpVolumeControl ), "volume", &nGstVolume, nullptr ); - nVolumeDB = (sal_Int16) ( 20.0*log10 ( nGstVolume ) ); + nVolumeDB = static_cast( 20.0*log10 ( nGstVolume ) ); } return nVolumeDB; @@ -935,7 +935,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co { mbUseGtkSink = false; mnWindowID = pEnvData->aWindow; - SAL_INFO( "avmedia.gstreamer", AVVERSION "set window id to " << (int)mnWindowID << " XOverlay " << mpXOverlay); + SAL_INFO( "avmedia.gstreamer", AVVERSION "set window id to " << static_cast(mnWindowID) << " XOverlay " << mpXOverlay); gst_element_set_state( mpPlaybin, GST_STATE_PAUSED ); if ( mpXOverlay != nullptr ) gst_video_overlay_set_window_handle( mpXOverlay, mnWindowID ); diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx index 3102dcac92b0..44eed54fca8e 100644 --- a/avmedia/source/vlc/wrapper/Player.cxx +++ b/avmedia/source/vlc/wrapper/Player.cxx @@ -235,7 +235,7 @@ namespace wrapper void Player::setWindow( intptr_t id ) { #if defined UNX - libvlc_media_player_set_xwindow( mPlayer, (uint32_t) id ); + libvlc_media_player_set_xwindow( mPlayer, static_cast(id) ); #elif defined MACOSX libvlc_media_player_set_nsobject( mPlayer, reinterpret_cast( id ) ); #elif defined WNT -- cgit