summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/ssfrm.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-09 11:32:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-09 16:12:21 +0200
commitf1b5a236d315bf0d37bc6143c070a0c33471f6f7 (patch)
treef8a7fee9b045fb414fdf54663a06fc6fdb81be8e /sw/source/core/layout/ssfrm.cxx
parent654bd1ab45a0f24571f029fcd247cf28db575871 (diff)
dynamic_cast followed by static_cast
Change-Id: I931ed8945b4af713ead42e0eca0bb5fb6cb07d9c Reviewed-on: https://gerrit.libreoffice.org/58759 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/layout/ssfrm.cxx')
-rw-r--r--sw/source/core/layout/ssfrm.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 7be4a5615a5d..831dc0c07aaf 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -475,9 +475,9 @@ void SwLayoutFrame::DestroyImpl()
const size_t nCnt = pFrame->GetDrawObjs()->size();
// #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0];
- if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
+ if (SwFlyFrame* pFlyFrame = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
{
- SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
+ SwFrame::DestroyFrame(pFlyFrame);
assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size());
}
else