diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-02 10:40:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-03 10:51:57 +0200 |
commit | 054c0e7177cbef26942f8ca7cb7b1422ceea721c (patch) | |
tree | 7390a1be5ee0797b7f43d7d433822315fd75c6dd /svl | |
parent | 0f499af8c2c22ccc8f1c19edeeb2bdac8cbcb7f0 (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 'svl')
-rw-r--r-- | svl/source/items/style.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index db0ee8d4242b..1d62ed6fb550 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -449,7 +449,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx) DoesStyleMatchStyleSheetPredicate predicate(this); rtl::Reference< SfxStyleSheetBase > ref = pBasePool->pImpl->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(nIdx, predicate); - if (ref.get() != nullptr) + if (ref) { nCurrentPosition = pBasePool->pImpl->mxIndexedStyleSheets->FindStyleSheetPosition(*ref); retval = ref.get(); |