vcl/source/app/vclevent.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b4861b60b2f6d7ffd9efcd8e028e2578da4b464f
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Wed Jun 22 08:24:30 2016 +0200

    Simplify dynamic_cast followed by a static_cast.
    
    Change-Id: Iec55b1d2e290e2bcc0286225b6f731314f058625

diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index da87732..4786fd6 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to