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 --- sdext/source/presenter/PresenterScrollBar.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sdext/source/presenter/PresenterScrollBar.cxx') diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index 46f1490e38f3..be498680fafa 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -520,7 +520,7 @@ void PresenterScrollBar::UpdateWidthOrHeight ( sal_Int32& rSize, const SharedBitmapDescriptor& rpDescriptor) { - if (rpDescriptor.get() != nullptr) + if (rpDescriptor) { Reference xBitmap (rpDescriptor->GetNormalBitmap()); if (xBitmap.is()) @@ -620,7 +620,7 @@ void PresenterVerticalScrollBar::UpdateBorders() const awt::Rectangle aWindowBox (mxWindow->getPosSize()); double nBottom = aWindowBox.Height; - if (mpNextButtonDescriptor.get() != nullptr) + if (mpNextButtonDescriptor) { Reference xBitmap (mpNextButtonDescriptor->GetNormalBitmap()); if (xBitmap.is()) @@ -631,7 +631,7 @@ void PresenterVerticalScrollBar::UpdateBorders() nBottom -= aSize.Height + gnScrollBarGap; } } - if (mpPrevButtonDescriptor.get() != nullptr) + if (mpPrevButtonDescriptor) { Reference xBitmap (mpPrevButtonDescriptor->GetNormalBitmap()); if (xBitmap.is()) -- cgit