diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-12 16:09:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-13 09:30:12 +0200 |
commit | f9ac067da9e61f479e2433d500b9b940e5a45470 (patch) | |
tree | 1b057d3b97cc7dcf6d3de377da34cbf23af9c3ee /sc/source/ui/docshell/docsh4.cxx | |
parent | 3ee3ae85de3a29ebfb89e75960b65417bfd6ca55 (diff) |
static_cast after dynamic_cast
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 11beaa2819b7..d8ed50e85f3f 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2591,10 +2591,10 @@ ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static while ( pShell && !pFound ) { - if ( dynamic_cast<const ScDocShell*>(pShell) != nullptr ) + if ( auto pDocSh = dynamic_cast<ScDocShell*>(pShell) ) { if ( nShellCnt == nDocNo ) - pFound = static_cast<ScDocShell*>(pShell); + pFound = pDocSh; else ++nShellCnt; } |