canvas/source/directx/dx_bitmapcanvashelper.cxx | 4 ++-- canvas/source/directx/dx_canvascustomsprite.cxx | 2 +- canvas/source/directx/dx_canvashelper.cxx | 4 ++-- canvas/source/directx/dx_canvashelper.hxx | 2 +- canvas/source/directx/dx_spritehelper.cxx | 6 +++--- dbaccess/source/ui/dlg/odbcconfig.cxx | 8 ++++---- dtrans/source/win32/clipb/WinClipboard.cxx | 10 +++++----- vcl/opengl/win/winlayout.cxx | 2 +- vcl/win/gdi/gdiimpl.cxx | 6 +++--- vcl/win/gdi/salbmp.cxx | 2 +- winaccessibility/source/service/AccObject.cxx | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-)
New commits: commit 48a3d6b85e3c2858c281d5f258fcf2120ca84265 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Aug 4 15:47:53 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Aug 4 23:28:17 2020 +0200 loplugin:simplifypointertobool (clang-cl) Change-Id: I6512e6e4217ef9084c74e46e3b4f1e8defbd1bec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100108 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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 } diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index 49b120d13588..f3de8ba7037f 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -279,7 +279,7 @@ OOdbcManagement::OOdbcManagement(const Link<void*,void>& rAsyncFinishCallback) OOdbcManagement::~OOdbcManagement() { // wait for our thread to be finished - if ( m_pProcessWait.get() ) + if ( m_pProcessWait ) m_pProcessWait->join(); } @@ -305,19 +305,19 @@ bool OOdbcManagement::manageDataSources_async() void OOdbcManagement::disableCallback() { - if (m_pProcessWait.get()) + if (m_pProcessWait) m_pProcessWait->disableCallback(); } void OOdbcManagement::receivedCallback() { - if (m_pProcessWait.get()) + if (m_pProcessWait) m_pProcessWait->receivedCallback(); } bool OOdbcManagement::isRunning() const { - return ( m_pProcessWait.get() && m_pProcessWait->isRunning() ); + return ( m_pProcessWait && m_pProcessWait->isRunning() ); } #endif // HAVE_ODBC_ADMINISTRATION diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 7de317766d77..8a1d1cc07e04 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -60,7 +60,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); - if ( nullptr != m_pImpl.get( ) ) + if ( m_pImpl ) return m_pImpl->getContents( ); return Reference< XTransferable >( ); @@ -75,7 +75,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); - if ( nullptr != m_pImpl.get( ) ) + if ( m_pImpl ) m_pImpl->setContents( xTransferable, xClipboardOwner ); } @@ -85,7 +85,7 @@ OUString SAL_CALL CWinClipboard::getName( ) throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); - if ( nullptr != m_pImpl.get( ) ) + if ( m_pImpl ) return m_pImpl->getName( ); return OUString(); @@ -101,7 +101,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); - if ( nullptr != m_pImpl.get( ) ) + if ( m_pImpl ) m_pImpl->flushClipboard( ); } @@ -113,7 +113,7 @@ sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); - if ( nullptr != m_pImpl.get( ) ) + if ( m_pImpl ) return CWinClipbImpl::getRenderingCapabilities( ); return 0; diff --git a/vcl/opengl/win/winlayout.cxx b/vcl/opengl/win/winlayout.cxx index 59bf12c25c8c..c8ead510dac8 100644 --- a/vcl/opengl/win/winlayout.cxx +++ b/vcl/opengl/win/winlayout.cxx @@ -13,7 +13,7 @@ bool OpenGLGlobalWinGlyphCache::AllocateTexture(WinGlyphDrawElement& rElement, CompatibleDC* dc) { - assert(rElement.maTexture.get() == nullptr); + assert(!rElement.maTexture); assert(dynamic_cast<OpenGLCompatibleDC*>(dc)); OpenGLCompatibleDC* odc = static_cast<OpenGLCompatibleDC*>(dc); OpenGLCompatibleDC::Texture* texture = new OpenGLCompatibleDC::Texture; diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index b019692726eb..e748fee84126 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -2540,7 +2540,7 @@ bool WinSalGraphicsImpl::TryDrawBitmapGDIPlus(const SalTwoRect& rTR, const SalBi const WinSalBitmap& rSalBitmap = static_cast< const WinSalBitmap& >(rSrcBitmap); std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap()); - if(aARGB.get()) + if(aARGB) { Gdiplus::Graphics aGraphics(mrParent.getHDC()); @@ -2593,7 +2593,7 @@ bool WinSalGraphicsImpl::drawAlphaBitmap( const WinSalBitmap& rSalAlpha = static_cast< const WinSalBitmap& >(rAlphaBmp); std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap(&rSalAlpha)); - if(aARGB.get()) + if(aARGB) { Gdiplus::Graphics aGraphics(mrParent.getHDC()); @@ -2630,7 +2630,7 @@ bool WinSalGraphicsImpl::drawTransformedBitmap( const WinSalBitmap* pSalAlpha = static_cast< const WinSalBitmap* >(pAlphaBitmap); std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap(pSalAlpha)); - if(aARGB.get()) + if(aARGB) { const long nSrcWidth(aARGB->GetWidth()); const long nSrcHeight(aARGB->GetHeight()); diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index f2b21a6668e9..33f450a07d16 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -662,7 +662,7 @@ bool WinSalBitmap::Create( const css::uno::Reference< css::rendering::XBitmapCan css::uno::Reference< css::beans::XFastPropertySet > xFastPropertySet( rBitmapCanvas, css::uno::UNO_QUERY ); - if( xFastPropertySet.get() ) { + if( xFastPropertySet ) { css::uno::Sequence< css::uno::Any > args; if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) { diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index f6460522838d..0763b4520a9c 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -398,7 +398,7 @@ void AccObject::SetValue( Any pAny ) case HEADING: case TABLE_CELL: - if(pRText.get()) + if(pRText) { val = pRText->getText(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits