diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 13:33:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 14:38:15 +0200 |
commit | 3afb514362a2ce2701628256fa96d4a5324433d6 (patch) | |
tree | 914e6c3b6a37f66543db8515b1031ae65a230b63 /basic/source/classes | |
parent | 73c8bd42650dafc38c87b5e6dc1ef222d4f6175c (diff) |
simplify static_cast after dynamic_cast
Change-Id: I53ae7f18519fdd878730d1d0316ebc408271c66d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes')
-rw-r--r-- | basic/source/classes/eventatt.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 6fa48784212e..6489d88d8339 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -417,12 +417,12 @@ void RTL_Impl_CreateUnoDialog( SbxArray& rPar ) // Get dialog SbxBaseRef pObj = rPar.Get(1)->GetObject(); - if( !(pObj.is() && dynamic_cast<const SbUnoObject*>( pObj.get() ) != nullptr) ) + SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>(pObj.get()); + if( !pUnoObj ) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } - SbUnoObject* pUnoObj = static_cast<SbUnoObject*>(pObj.get()); Any aAnyISP = pUnoObj->getUnoAny(); TypeClass eType = aAnyISP.getValueType().getTypeClass(); |