[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Sun Oct 22 09:55:20 UTC 2017


 vcl/source/app/svapp.cxx    |    2 +-
 vcl/source/window/event.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4e7ffc0a69dac31ca7e0f1649f1697a1ff8d6e5f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Oct 22 11:52:41 2017 +0200

    Avoid compiler eliding redundant dynamic_cast
    
    ...from vcl::Window to itself.  This relies on vcl::Window deriving solely from
    OutputDevice.
    
    Change-Id: I530108ff41d2c141a88e9ec9d9d6929abc773c0d

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 77394497ed18..747c70a0ae95 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1004,7 +1004,7 @@ ImplSVEvent * Application::PostUserEvent( const Link<void*,void>& rLink, void* p
         SolarMutexGuard aGuard;
         // Double check that this is indeed a vcl::Window instance.
         assert(dynamic_cast<vcl::Window *>(
-                        static_cast<vcl::Window *>(rLink.GetInstance())) ==
+                        static_cast<OutputDevice *>(rLink.GetInstance())) ==
                static_cast<vcl::Window *>(rLink.GetInstance()));
         pSVEvent->mpInstanceRef = static_cast<vcl::Window *>(rLink.GetInstance());
     }
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index b6f6c3771f7b..6a9ed84cbaab 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -329,7 +329,7 @@ ImplSVEvent * Window::PostUserEvent( const Link<void*,void>& rLink, void* pCalle
     {
         // Double check that this is indeed a vcl::Window instance.
         assert(dynamic_cast<vcl::Window *>(
-                        static_cast<vcl::Window *>(rLink.GetInstance())) ==
+                        static_cast<OutputDevice *>(rLink.GetInstance())) ==
                static_cast<vcl::Window *>(rLink.GetInstance()));
         pSVEvent->mpInstanceRef = static_cast<vcl::Window *>(rLink.GetInstance());
     }


More information about the Libreoffice-commits mailing list