sw/source/uibase/utlui/navipi.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 53d18f277227c957d9c7370d423e4cd2a69649bf Author: Jan Holesovsky <[email protected]> Date: Thu Jul 14 10:54:21 2016 +0200 Simplify dynamic_cast followed by a static_cast. Change-Id: Id4ab82db5e0ac95e26299730797a6eac0f925fb8 diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 2d66ac1..31827ae 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -972,21 +972,21 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) { if(&rBrdc == m_pCreateView) { - if(dynamic_cast<const SfxSimpleHint*>(&rHint) && static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING) + const SfxSimpleHint* pHint = dynamic_cast<const SfxSimpleHint*>(&rHint); + if (pHint && pHint->GetId() == SFX_HINT_DYING) { m_pCreateView = nullptr; } } else { - if(dynamic_cast<const SfxEventHint*>(&rHint)) + if (const SfxEventHint* pHint = dynamic_cast<const SfxEventHint*>(&rHint)) { - if( m_pxObjectShell && - static_cast<const SfxEventHint&>( rHint).GetEventId() == SFX_EVENT_CLOSEAPP) + if (m_pxObjectShell && pHint->GetEventId() == SFX_EVENT_CLOSEAPP) { DELETEZ(m_pxObjectShell); } - else if(static_cast<const SfxEventHint&>( rHint).GetEventId() == SFX_EVENT_OPENDOC) + else if (pHint->GetEventId() == SFX_EVENT_OPENDOC) { SwView *pActView = GetCreateView(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
