diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:28:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:32:00 +0100 |
commit | d3b6cb7ec2da4afb5687c9d28b2be2f96e6aa7b1 (patch) | |
tree | e9d209d6d5f06cacd8e0df78c7f6b8ad45d74be5 /vcl/source/gdi/gfxlink.cxx | |
parent | 45979047abbd9da7a29401f298e8ef9ab58ad337 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
Diffstat (limited to 'vcl/source/gdi/gfxlink.cxx')
-rw-r--r-- | vcl/source/gdi/gfxlink.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index 26a69d260493..cab29181f625 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -32,8 +32,8 @@ GfxLink::GfxLink() : meType ( GFX_LINK_TYPE_NONE ), - mpBuf ( NULL ), - mpSwap ( NULL ), + mpBuf ( nullptr ), + mpSwap ( nullptr ), mnBufSize ( 0 ), mnUserId ( 0UL ), mpImpData ( new ImpGfxLink ) @@ -49,12 +49,12 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) : GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) : mpImpData( new ImpGfxLink ) { - DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0), + DBG_ASSERT( (pBuf != nullptr && nSize) || (!bOwns && nSize == 0), "GfxLink::GfxLink(): empty/NULL buffer given" ); meType = nType; mnBufSize = nSize; - mpSwap = NULL; + mpSwap = nullptr; mnUserId = 0UL; if( bOwns ) @@ -65,7 +65,7 @@ GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOw memcpy( mpBuf->mpBuffer, pBuf, nSize ); } else - mpBuf = NULL; + mpBuf = nullptr; } GfxLink::~GfxLink() @@ -109,7 +109,7 @@ bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const { bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0; } - else if ( ( pSource == 0 ) && ( pDest == 0 ) ) + else if ( ( pSource == nullptr ) && ( pDest == nullptr ) ) bIsEqual = true; } return bIsEqual; @@ -143,7 +143,7 @@ const sal_uInt8* GfxLink::GetData() const if( IsSwappedOut() ) const_cast<GfxLink*>(this)->SwapIn(); - return( mpBuf ? mpBuf->mpBuffer : NULL ); + return( mpBuf ? mpBuf->mpBuffer : nullptr ); } @@ -212,14 +212,14 @@ void GfxLink::SwapOut() if( !mpSwap->IsSwapped() ) { delete mpSwap; - mpSwap = NULL; + mpSwap = nullptr; } else { if( !( --mpBuf->mnRefCount ) ) delete mpBuf; - mpBuf = NULL; + mpBuf = nullptr; } } } @@ -233,7 +233,7 @@ void GfxLink::SwapIn() if( !( --mpSwap->mnRefCount ) ) delete mpSwap; - mpSwap = NULL; + mpSwap = nullptr; } } @@ -366,13 +366,13 @@ sal_uInt8* ImpSwap::GetData() const xIStm.reset(); if( bError ) - delete[] pData, pData = NULL; + delete[] pData, pData = nullptr; } else - pData = NULL; + pData = nullptr; } else - pData = NULL; + pData = nullptr; return pData; } |