diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-08 12:36:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-10 12:02:44 +0200 |
commit | 366d08f2f6d4de922f6099c62bb81b49d89e0a68 (patch) | |
tree | b232884af6e844c2f0994859e4b42efbc1ce654c /basic/source | |
parent | 75a2257a5bd716a9f937abe5e53f305c983afd5d (diff) |
new loplugin:simplifypointertobool
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 88ade90a4677..0232c01ca44e 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2178,7 +2178,7 @@ SbxVariable* SbObjModule::Find( const OUString& rName, SbxClassType t ) { SbxVariable* pVar = nullptr; - if ( pDocObject.get() ) + if ( pDocObject ) pVar = pDocObject->Find( rName, t ); if ( !pVar ) pVar = SbModule::Find( rName, t ); diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 280f8ebe869e..0dcd6c8aa78e 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -134,7 +134,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx ) SbxVariableRef& rRef = GetRef32( nIdx ); // tdf#122250. It is possible that I hold the last reference to myself, so check, otherwise I might // call SetFlag on myself after I have died. - bool removingMyself = rRef.get() && rRef->GetParameters() == this && GetRefCount() == 1; + bool removingMyself = rRef && rRef->GetParameters() == this && GetRefCount() == 1; if( rRef.get() != pVar ) { rRef = pVar; |