From f1b5a236d315bf0d37bc6143c070a0c33471f6f7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 9 Aug 2018 11:32:55 +0100 Subject: dynamic_cast followed by static_cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I931ed8945b4af713ead42e0eca0bb5fb6cb07d9c Reviewed-on: https://gerrit.libreoffice.org/58759 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/layout/ssfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/core/layout/ssfrm.cxx') 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(pAnchoredObj)) { - SwFrame::DestroyFrame(static_cast(pAnchoredObj)); + SwFrame::DestroyFrame(pFlyFrame); assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size()); } else -- cgit v1.2.3