summaryrefslogtreecommitdiff
path: root/svtools/source
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 /svtools/source
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 'svtools/source')
-rw-r--r--svtools/source/brwbox/brwbox2.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index e9e725149020..1046363849b9 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -159,7 +159,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
// do we have a handle column?
bool bHandleCol = !mvCols.empty() && (0 == mvCols[ 0 ]->GetId());
// do we have a header bar?
- bool bHeaderBar = (nullptr != pDataWin->pHeaderBar.get());
+ bool bHeaderBar(pDataWin->pHeaderBar);
if ( nTitleLines
&& ( !bHeaderBar
@@ -552,7 +552,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
BrowserColumn *pFirstCol = mvCols[ 0 ].get();
bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
- bool bHeaderBar = pDataWin->pHeaderBar.get() != nullptr;
+ bool bHeaderBar(pDataWin->pHeaderBar);
// draw delimitational lines
if (!pDataWin->bNoHScroll)
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 6670f1182121..270a0ee343ff 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2108,7 +2108,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId)
bool TabBar::IsInEditMode() const
{
- return mpImpl->mpEdit.get() != nullptr;
+ return bool(mpImpl->mpEdit);
}
void TabBar::EndEditMode(bool bCancel)