sw/source/core/edit/edws.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit ea49b0f30d227df3d75991a3d3369aac70aa944d Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 31 16:36:01 2018 +0100 dynamic_cast followed by static_cast Change-Id: I79c1766a76a5b3b7077c812e3ae9197010e36d40 Reviewed-on: https://gerrit.libreoffice.org/55141 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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<const SwEditShell *>(&rCurrentShell) != nullptr ) - static_cast<SwEditShell*>(&rCurrentShell)->StartAction(); + if (SwEditShell* pEditShell = dynamic_cast<SwEditShell*>(&rCurrentShell)) + pEditShell->StartAction(); else rCurrentShell.StartAction(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits