summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-06-22 08:24:30 +0200
committerJan Holesovsky <kendy@collabora.com>2016-06-22 08:24:30 +0200
commitb4861b60b2f6d7ffd9efcd8e028e2578da4b464f (patch)
treed4d4b5326d5f6c99c880fc49fb758ddfec164abd /vcl/source/app
parent336beb8b39c5486afd9b2aaa95ae897de3e13a29 (diff)
Simplify dynamic_cast followed by a static_cast.
Change-Id: Iec55b1d2e290e2bcc0286225b6f731314f058625
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/vclevent.cxx4
1 files changed, 2 insertions, 2 deletions
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<Link<VclSimpleEvent&,void>> aCopy( m_aListeners );
std::vector<Link<VclSimpleEvent&,void>>::iterator aIter( aCopy.begin() );
std::vector<Link<VclSimpleEvent&,void>>::const_iterator aEnd( aCopy.end() );
- if( dynamic_cast<const VclWindowEvent*>( &rEvent ) != nullptr )
+ if (VclWindowEvent* pWindowEvent = dynamic_cast<VclWindowEvent*>(&rEvent))
{
- VclPtr<vcl::Window> xWin((static_cast<VclWindowEvent*>(&rEvent))->GetWindow());
+ VclPtr<vcl::Window> xWin(pWindowEvent->GetWindow());
while ( aIter != aEnd && xWin && ! xWin->IsDisposed() )
{
Link<VclSimpleEvent&,void> &rLink = *aIter;