From 054c0e7177cbef26942f8ca7cb7b1422ceea721c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Jun 2020 10:40:26 +0200 Subject: 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 --- cppcanvas/source/wrapper/vclfactory.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cppcanvas/source/wrapper/vclfactory.cxx') 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 ) -- cgit