diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-04 15:47:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-04 23:28:17 +0200 |
commit | 48a3d6b85e3c2858c281d5f258fcf2120ca84265 (patch) | |
tree | 1f3d2b1f80d4033038b1c9ad1dbbb5ce18f3ff43 /canvas/source | |
parent | 5eb43d74e1aea8eebb67e2d9e98335a1c5d81248 (diff) |
loplugin:simplifypointertobool (clang-cl)
Change-Id: I6512e6e4217ef9084c74e46e3b4f1e8defbd1bec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100108
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source')
-rw-r--r-- | canvas/source/directx/dx_bitmapcanvashelper.cxx | 4 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvascustomsprite.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvashelper.cxx | 4 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvashelper.hxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_spritehelper.cxx | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx index b6d08fbbf8df..9733853f5958 100644 --- a/canvas/source/directx/dx_bitmapcanvashelper.cxx +++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx @@ -60,7 +60,7 @@ namespace dxcanvas { ENSURE_OR_THROW( rTarget, "BitmapCanvasHelper::setTarget(): Invalid target" ); - ENSURE_OR_THROW( !mpTarget.get(), + ENSURE_OR_THROW( !mpTarget, "BitmapCanvasHelper::setTarget(): target set, old target would be overwritten" ); mpTarget = rTarget; @@ -72,7 +72,7 @@ namespace dxcanvas { ENSURE_OR_THROW( rTarget, "BitmapCanvasHelper::setTarget(): invalid target" ); - ENSURE_OR_THROW( !mpTarget.get(), + ENSURE_OR_THROW( !mpTarget, "BitmapCanvasHelper::setTarget(): target set, old target would be overwritten" ); mpTarget = rTarget; diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx index f850342919b5..a0e58f29d4f9 100644 --- a/canvas/source/directx/dx_canvascustomsprite.cxx +++ b/canvas/source/directx/dx_canvascustomsprite.cxx @@ -45,7 +45,7 @@ namespace dxcanvas mpSpriteCanvas( rRefDevice ), mpSurface() { - ENSURE_OR_THROW( rRefDevice.get(), + ENSURE_OR_THROW( rRefDevice, "CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" ); mpSurface = std::make_shared<DXSurfaceBitmap>( diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 927f838244ab..de4969c6dd48 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -124,7 +124,7 @@ namespace dxcanvas { ENSURE_OR_THROW( rTarget, "CanvasHelper::setTarget(): Invalid target" ); - ENSURE_OR_THROW( !mpGraphicsProvider.get(), + ENSURE_OR_THROW( !mpGraphicsProvider, "CanvasHelper::setTarget(): target set, old target would be overwritten" ); mpGraphicsProvider = rTarget; @@ -135,7 +135,7 @@ namespace dxcanvas { ENSURE_OR_THROW( rTarget, "CanvasHelper::setTarget(): invalid target" ); - ENSURE_OR_THROW( !mpGraphicsProvider.get(), + ENSURE_OR_THROW( !mpGraphicsProvider, "CanvasHelper::setTarget(): target set, old target would be overwritten" ); mpGraphicsProvider = rTarget; diff --git a/canvas/source/directx/dx_canvashelper.hxx b/canvas/source/directx/dx_canvashelper.hxx index 483033fd7c49..12c939e2e9ac 100644 --- a/canvas/source/directx/dx_canvashelper.hxx +++ b/canvas/source/directx/dx_canvashelper.hxx @@ -236,7 +236,7 @@ namespace dxcanvas /// Provides the Gdiplus::Graphics to render into GraphicsProviderSharedPtr mpGraphicsProvider; - bool needOutput() const { return mpGraphicsProvider.get() != nullptr; }; + bool needOutput() const { return bool(mpGraphicsProvider); }; // returns transparency of color void setupGraphicsState( GraphicsSharedPtr const & rGraphics, diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx index af4f340a5437..8f436283387c 100644 --- a/canvas/source/directx/dx_spritehelper.cxx +++ b/canvas/source/directx/dx_spritehelper.cxx @@ -55,7 +55,7 @@ namespace dxcanvas const DXSurfaceBitmapSharedPtr& rBitmap, bool bShowSpriteBounds ) { - ENSURE_OR_THROW( rSpriteCanvas.get() && + ENSURE_OR_THROW( rSpriteCanvas && rRenderModule && rBitmap, "SpriteHelper::init(): Invalid device, sprite canvas or surface" ); @@ -87,7 +87,7 @@ namespace dxcanvas bool SpriteHelper::needRedraw() const { if( !mpBitmap || - !mpSpriteCanvas.get() ) + !mpSpriteCanvas ) { return false; // we're disposed, no redraw necessary } @@ -104,7 +104,7 @@ namespace dxcanvas void SpriteHelper::redraw( bool& io_bSurfaceDirty ) const { if( !mpBitmap || - !mpSpriteCanvas.get() ) + !mpSpriteCanvas ) { return; // we're disposed } |