Kaydet (Commit) d9376e1f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite; Mac-specific code)

Change-Id: Ib50c9415e1ddd0e6cabc1b737a39a7d101014da9
üst 551433e7
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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
......
......@@ -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
......
......@@ -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 )
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment