diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-06 20:28:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-07 00:04:51 +0000 |
commit | fb92ec82caa96f2ddf4ab4bca8c51503ae9fba82 (patch) | |
tree | 1e5b8f0a5803792cf27d91a4ff4791b470639c50 | |
parent | 9e7ff6a7e4415ce18b7a68c857bdb86f142a8e5d (diff) |
dynamic cast followed by static cast
Change-Id: I425692130bd7ef6b8a9ebce3592c1976fa44dafc
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 977841b415fd..06e9f66915f8 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -598,9 +598,9 @@ bool CheckControlLayer( const SdrObject *pObj ) { if ( SdrInventor::FmForm == pObj->GetObjInventor() ) return true; - if ( dynamic_cast<const SdrObjGroup*>( pObj) != nullptr ) + if (const SdrObjList *pObjLst = dynamic_cast<const SdrObjGroup*>(pObj)) { - const SdrObjList *pLst = static_cast<const SdrObjGroup*>(pObj)->GetSubList(); + const SdrObjList *pLst = pObjLst->GetSubList(); for ( size_t i = 0; i < pLst->GetObjCount(); ++i ) { if ( ::CheckControlLayer( pLst->GetObj( i ) ) ) |