diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-31 16:36:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-31 22:05:12 +0200 |
commit | ea49b0f30d227df3d75991a3d3369aac70aa944d (patch) | |
tree | b445893bfe50b89e74314291bd580eac2cafc75c /sw | |
parent | b83ec344f914ec6571d6d53b1ea7d0924db7a6a4 (diff) |
dynamic_cast followed by static_cast
Change-Id: I79c1766a76a5b3b7077c812e3ae9197010e36d40
Reviewed-on: https://gerrit.libreoffice.org/55141
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/edws.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } |