From ea49b0f30d227df3d75991a3d3369aac70aa944d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 31 May 2018 16:36:01 +0100 Subject: dynamic_cast followed by static_cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I79c1766a76a5b3b7077c812e3ae9197010e36d40 Reviewed-on: https://gerrit.libreoffice.org/55141 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/edit/edws.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index d9ce2329e225..32770a346284 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -88,8 +88,8 @@ void SwEditShell::StartAllAction() { for(SwViewShell& rCurrentShell : GetRingContainer()) { - if( dynamic_cast(&rCurrentShell) != nullptr ) - static_cast(&rCurrentShell)->StartAction(); + if (SwEditShell* pEditShell = dynamic_cast(&rCurrentShell)) + pEditShell->StartAction(); else rCurrentShell.StartAction(); } -- cgit