diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-08-09 16:30:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-10 08:21:55 +0200 |
commit | d977e02ec6350115c39f03d588539e8bd423a1c3 (patch) | |
tree | bd624f4037b1d498cde385e56d48e383335c32ce /basic/source/runtime/methods1.cxx | |
parent | 76dd6bb9cc6dff0f59cdfce87b61210be6476965 (diff) |
unnecessary null check before dynamic_cast, in various
Change-Id: I76ad0b3152030c29ee28f6a6cc80d0832188d02b
Reviewed-on: https://gerrit.libreoffice.org/58774
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 4b59ea081c28..7f5ab0233096 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -123,7 +123,7 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool) SbxObject* pObj = nullptr; if( pObjVar ) pObj = dynamic_cast<SbxObject*>( pObjVar ); - if( !pObj && pObjVar && dynamic_cast<const SbxVariable*>( pObjVar) != nullptr ) + if( !pObj && dynamic_cast<const SbxVariable*>( pObjVar) ) { SbxBase* pObjVarObj = static_cast<SbxVariable*>(pObjVar)->GetObject(); pObj = dynamic_cast<SbxObject*>( pObjVarObj ); @@ -864,7 +864,7 @@ void SbRtl_FindPropertyObject(StarBASIC *, SbxArray & rPar, bool) { pObj = dynamic_cast<SbxObject*>( pObjVar ); } - if( !pObj && pObjVar && dynamic_cast<const SbxVariable*>( pObjVar) != nullptr ) + if( !pObj && dynamic_cast<const SbxVariable*>( pObjVar) ) { SbxBase* pObjVarObj = static_cast<SbxVariable*>(pObjVar)->GetObject(); pObj = dynamic_cast<SbxObject*>( pObjVarObj ); |