From b4861b60b2f6d7ffd9efcd8e028e2578da4b464f Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 22 Jun 2016 08:24:30 +0200 Subject: Simplify dynamic_cast followed by a static_cast. Change-Id: Iec55b1d2e290e2bcc0286225b6f731314f058625 --- vcl/source/app/vclevent.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/source/app') diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx index da87732e67e4..4786fd6d3195 100644 --- a/vcl/source/app/vclevent.cxx +++ b/vcl/source/app/vclevent.cxx @@ -49,9 +49,9 @@ void VclEventListeners::Call( VclSimpleEvent& rEvent ) const std::vector> aCopy( m_aListeners ); std::vector>::iterator aIter( aCopy.begin() ); std::vector>::const_iterator aEnd( aCopy.end() ); - if( dynamic_cast( &rEvent ) != nullptr ) + if (VclWindowEvent* pWindowEvent = dynamic_cast(&rEvent)) { - VclPtr xWin((static_cast(&rEvent))->GetWindow()); + VclPtr xWin(pWindowEvent->GetWindow()); while ( aIter != aEnd && xWin && ! xWin->IsDisposed() ) { Link &rLink = *aIter; -- cgit