From 638a4ec6dc5b1ea83dba32d78a417a4eeee4032e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 8 Jun 2015 16:23:21 +0200 Subject: [PATCH] loplugin:cstylecast: deal with remaining pointer casts Change-Id: I8e3adffc4eca232889bbffd8efca48bad78a8b91 --- canvas/source/cairo/cairo_canvasbitmap.cxx | 2 +- canvas/source/vcl/canvasbitmaphelper.cxx | 8 ++++---- canvas/source/vcl/canvashelper_texturefill.cxx | 2 +- canvas/source/vcl/impltools.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index fe9b378a6c87..c0ecc5a73e99 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -113,7 +113,7 @@ namespace cairocanvas { case 0: { - aRV = uno::Any( reinterpret_cast( (BitmapEx *) NULL ) ); + aRV = uno::Any( reinterpret_cast( nullptr ) ); if ( !mbHasAlpha ) break; diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx index d818ed862634..2d21cc4718a5 100644 --- a/canvas/source/vcl/canvasbitmaphelper.cxx +++ b/canvas/source/vcl/canvasbitmaphelper.cxx @@ -139,7 +139,7 @@ namespace vclcanvas Bitmap::ScopedReadAccess pReadAccess( aBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ? - (BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(), + nullptr : aAlpha.AcquireReadAccess(), aAlpha ); ENSURE_OR_THROW( pReadAccess.get() != NULL, @@ -218,7 +218,7 @@ namespace vclcanvas { Bitmap::ScopedWriteAccess pWriteAccess( aBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ? - (BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(), + nullptr : aAlpha.AcquireWriteAccess(), aAlpha ); if( pAlphaWriteAccess.get() ) @@ -459,7 +459,7 @@ namespace vclcanvas { Bitmap::ScopedWriteAccess pWriteAccess( aBitmap ); Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ? - (BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(), + nullptr : aAlpha.AcquireWriteAccess(), aAlpha ); ENSURE_OR_THROW( pWriteAccess.get() != NULL, @@ -512,7 +512,7 @@ namespace vclcanvas Bitmap::ScopedReadAccess pReadAccess( aBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ? - (BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(), + nullptr : aAlpha.AcquireReadAccess(), aAlpha ); ENSURE_OR_THROW( pReadAccess.get() != NULL, "Could not acquire read access to bitmap" ); diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index cf628c750376..0e62f6af2804 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -713,7 +713,7 @@ namespace vclcanvas // TODO(E1): Return value // TODO(F1): FillRule gradientFill( mpOutDev->getOutDev(), - mp2ndOutDev.get() ? &mp2ndOutDev->getOutDev() : (OutputDevice*)NULL, + mp2ndOutDev.get() ? &mp2ndOutDev->getOutDev() : nullptr, rValues, aColors, aPolyPoly, diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx index 26a26cf08a5d..abdd44d5a69c 100644 --- a/canvas/source/vcl/impltools.cxx +++ b/canvas/source/vcl/impltools.cxx @@ -258,7 +258,7 @@ namespace vclcanvas Bitmap::ScopedReadAccess pReadAccess( aSrcBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ? aSrcAlpha.AcquireReadAccess() : - (BitmapReadAccess*)NULL, + nullptr, aSrcAlpha ); if( pReadAccess.get() == NULL ||