summaryrefslogtreecommitdiff
path: root/cppcanvas/source/wrapper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-02 10:40:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-03 10:51:57 +0200
commit054c0e7177cbef26942f8ca7cb7b1422ceea721c (patch)
tree7390a1be5ee0797b7f43d7d433822315fd75c6dd /cppcanvas/source/wrapper
parent0f499af8c2c22ccc8f1c19edeeb2bdac8cbcb7f0 (diff)
loplugin:simplifypointertobool improve
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas/source/wrapper')
-rw-r--r--cppcanvas/source/wrapper/basegfxfactory.cxx9
-rw-r--r--cppcanvas/source/wrapper/implbitmap.cxx6
-rw-r--r--cppcanvas/source/wrapper/implpolypolygon.cxx3
-rw-r--r--cppcanvas/source/wrapper/vclfactory.cxx3
4 files changed, 7 insertions, 14 deletions
diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index 0549c4e12175..8f11c6bb4a49 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -37,8 +37,7 @@ namespace cppcanvas
PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2DPolygon& rPoly )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createPolyPolygon(): Invalid canvas" );
if( rCanvas.get() == nullptr )
@@ -57,8 +56,7 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )
@@ -76,8 +74,7 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )
diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx
index 8ce319539523..4ca8980a1b15 100644
--- a/cppcanvas/source/wrapper/implbitmap.cxx
+++ b/cppcanvas/source/wrapper/implbitmap.cxx
@@ -53,8 +53,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
if( pCanvas.get() == nullptr ||
@@ -75,8 +74,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::drawAlphaModulated(): invalid canvas" );
if( pCanvas.get() == nullptr ||
diff --git a/cppcanvas/source/wrapper/implpolypolygon.cxx b/cppcanvas/source/wrapper/implpolypolygon.cxx
index 1e8fc7c8b5f5..54f0fe30818c 100644
--- a/cppcanvas/source/wrapper/implpolypolygon.cxx
+++ b/cppcanvas/source/wrapper/implpolypolygon.cxx
@@ -88,8 +88,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
if( pCanvas.get() == nullptr ||
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index c90d91b23de8..9d286ec7d8d3 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -56,8 +56,7 @@ namespace cppcanvas
BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::BitmapEx& rBmpEx )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"VCLFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )