summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-04-04 19:21:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-04-04 22:12:14 +0200
commit57b8e4ac7fa55c32497068be48fd4a11cf583c8d (patch)
treebd010227caaad17e33753a5af5ba41a1671a923b
parent866e666009ba028a646ff32158b450a5ee20d4b4 (diff)
dynamic cast followed by static cast
Change-Id: I4baf27d952f173ec515938df754b664b527d16f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91694 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/layout/frmtool.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index c99eb61b82d8..d9a24922dcf7 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2995,9 +2995,8 @@ static void lcl_Regist( SwPageFrame *pPage, const SwFrame *pAnch )
SwSortedObjs *pObjs = const_cast<SwSortedObjs*>(pAnch->GetDrawObjs());
for (SwAnchoredObject* pObj : *pObjs)
{
- if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
+ if (SwFlyFrame* pFly = dynamic_cast<SwFlyFrame*>(pObj))
{
- SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj);
// register (not if already known)
// #i28701# - use new method <GetPageFrame()>
SwPageFrame *pPg = pFly->IsFlyFreeFrame()