diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-20 20:51:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-21 15:44:11 +0200 |
commit | ead920a48aa8c35075fdb980b9d213ff1c580dd1 (patch) | |
tree | bb1628fd293f03b22920bc74e89657320da6442e /basic | |
parent | fe5b70723fc83f229fb4b41231a663a8700f48c4 (diff) |
loplugin:redundantcast handle dynamic_cast
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 0b63ea746e13..0dea0076bc90 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2428,7 +2428,7 @@ void clearUnoMethodsForBasic( StarBASIC const * pBasic ) SbUnoMethod* pMeth = pFirst; while( pMeth ) { - SbxObject* pObject = dynamic_cast< SbxObject* >( pMeth->GetParent() ); + SbxObject* pObject = pMeth->GetParent(); if ( pObject ) { StarBASIC* pModBasic = dynamic_cast< StarBASIC* >( pObject->GetParent() ); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 25b2cf418923..85b5a2412653 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1303,7 +1303,7 @@ void SbModule::ClearPrivateVars() { for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ ) { - SbxVariable* pj = dynamic_cast<SbxVariable*>( pArray->Get( j ) ); + SbxVariable* pj = pArray->Get( j ); pj->SbxValue::Clear(); } } @@ -1356,7 +1356,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ) { for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ ) { - SbxVariable* pVar = dynamic_cast<SbxVariable*>( pArray->Get( j ) ); + SbxVariable* pVar = pArray->Get( j ); implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic ); } } diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 4bdc64e86c1f..56bec717b8aa 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -845,9 +845,9 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) { pSbxObj->Dump(rStrm, bFill); } - else if (SbxVariable *pSbxVar = dynamic_cast<SbxVariable*>(pVar)) + else { - pSbxVar->Dump(rStrm, bFill); + pVar->Dump(rStrm, bFill); } } } |