diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 16:18:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 16:20:34 +0100 |
commit | d9376e1fc80e322d527e001590b5f1312c7b9477 (patch) | |
tree | 6faf9af710e59470987f4fc9b5fd172efbd69050 /avmedia | |
parent | 551433e7cfc371215bb414aec11c26f8222d5f09 (diff) |
loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: Ib50c9415e1ddd0e6cabc1b737a39a7d101014da9
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/macavf/framegrabber.mm | 8 | ||||
-rw-r--r-- | avmedia/source/macavf/macavfuno.mm | 2 | ||||
-rw-r--r-- | avmedia/source/macavf/player.mm | 6 | ||||
-rw-r--r-- | avmedia/source/macavf/window.mm | 2 | ||||
-rw-r--r-- | avmedia/source/quicktime/quicktimeuno.mm | 2 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.mm | 6 |
6 files changed, 13 insertions, 13 deletions
diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm index c23e4a2de646..dd6a5c530582 100644 --- a/avmedia/source/macavf/framegrabber.mm +++ b/avmedia/source/macavf/framegrabber.mm @@ -34,7 +34,7 @@ namespace avmedia { namespace macavf { // ---------------- FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& /*rxMgr*/ ) -: mpImageGen( NULL ) +: mpImageGen( nullptr ) {} // ------------------------------------------------------------------------------ @@ -90,12 +90,12 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe OSL_TRACE( "AVPlayer::grabFrame( %.3fsec)", fMediaTime ); // get the requested image from the movie - CGImage* pCGImage = [mpImageGen copyCGImageAtTime:CMTimeMakeWithSeconds(fMediaTime,1000) actualTime:NULL error:NULL]; + CGImage* pCGImage = [mpImageGen copyCGImageAtTime:CMTimeMakeWithSeconds(fMediaTime,1000) actualTime:nullptr error:nullptr]; // convert the image to a TIFF-formatted byte-array CFMutableDataRef pCFData = CFDataCreateMutable( kCFAllocatorDefault, 0 ); - CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( pCFData, kUTTypeTIFF, 1, 0 ); - CGImageDestinationAddImage( pCGImgDest, pCGImage, NULL ); + CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( pCFData, kUTTypeTIFF, 1, nullptr ); + CGImageDestinationAddImage( pCGImgDest, pCGImage, nullptr ); CGImageDestinationFinalize( pCGImgDest ); CFRelease( pCGImgDest ); const long nBitmapLen = CFDataGetLength( pCFData ); diff --git a/avmedia/source/macavf/macavfuno.mm b/avmedia/source/macavf/macavfuno.mm index fca3be2ee8a6..57bd8b0ec81b 100644 --- a/avmedia/source/macavf/macavfuno.mm +++ b/avmedia/source/macavf/macavfuno.mm @@ -30,7 +30,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno: extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaMacAVF_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = nullptr; if( rtl_str_compare( pImplName, AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME ) == 0 ) { diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm index b3cd425eee52..81a5329cf01e 100644 --- a/avmedia/source/macavf/player.mm +++ b/avmedia/source/macavf/player.mm @@ -60,7 +60,7 @@ using namespace ::com::sun::star; namespace avmedia { namespace macavf { -MacAVObserverObject* MacAVObserverHandler::mpMacAVObserverObject = NULL; +MacAVObserverObject* MacAVObserverHandler::mpMacAVObserverObject = nullptr; MacAVObserverObject* MacAVObserverHandler::getObserver() { @@ -79,7 +79,7 @@ MacAVObserverObject* MacAVObserverHandler::getObserver() Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : mxMgr( rxMgr ) -, mpPlayer( NULL ) +, mpPlayer( nullptr ) , mfUnmutedVolume( 0 ) , mfStopTime( DBL_MAX ) , mbMuted( false ) @@ -380,7 +380,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co // check the window parameters uno::Reference< ::media::XPlayerWindow > xRet; - if( (aSize.Width <= 0) || (aSize.Height <= 0) || (pParentView == NULL) ) + if( (aSize.Width <= 0) || (aSize.Height <= 0) || (pParentView == nullptr) ) return xRet; // create the window diff --git a/avmedia/source/macavf/window.mm b/avmedia/source/macavf/window.mm index 82afa2fc425b..e6c4d7fc92af 100644 --- a/avmedia/source/macavf/window.mm +++ b/avmedia/source/macavf/window.mm @@ -39,7 +39,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla , mrPlayer( i_rPlayer ) , mnPointerType( awt::SystemPointer::ARROW ) , mpView( i_pParentView ) -, mpPlayerLayer( NULL ) +, mpPlayerLayer( nullptr ) { OSL_TRACE ("Constructing an avmedia::macavf::Window"); if( !mpView ) // sanity check diff --git a/avmedia/source/quicktime/quicktimeuno.mm b/avmedia/source/quicktime/quicktimeuno.mm index 0ca8370bf847..befff1c9ec4b 100644 --- a/avmedia/source/quicktime/quicktimeuno.mm +++ b/avmedia/source/quicktime/quicktimeuno.mm @@ -34,7 +34,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno: extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = nullptr; if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 ) { diff --git a/avmedia/source/quicktime/window.mm b/avmedia/source/quicktime/window.mm index 30e5bfc8cdb2..683610d995ca 100644 --- a/avmedia/source/quicktime/window.mm +++ b/avmedia/source/quicktime/window.mm @@ -31,13 +31,13 @@ namespace avmedia { namespace quicktime { static ::osl::Mutex& ImplGetOwnStaticMutex() { - static ::osl::Mutex* pMutex = NULL; + static ::osl::Mutex* pMutex = nullptr; - if( pMutex == NULL ) + if( pMutex == nullptr ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( pMutex == NULL ) + if( pMutex == nullptr ) { static ::osl::Mutex aMutex; pMutex = &aMutex; |