diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-08-09 16:30:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-10 08:20:52 +0200 |
commit | 4e63c00f4dd5f8ac6496481e687c59209f9aee07 (patch) | |
tree | d43341c2cdef53fbbe4dd9103faa529d08cedd98 /sd/source/ui/docshell | |
parent | 7fdd5a12f6d20422ebda1d3afd5e5146cadbe0e5 (diff) |
unnecessary null check before dynamic_cast, in sd
Change-Id: I91579ece17b85b1ae9926b7a05eb641672e8ecbd
Reviewed-on: https://gerrit.libreoffice.org/58772
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index d6f7ec0127ec..288e0b15c9df 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -725,9 +725,8 @@ SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool() void DrawDocShell::GotoBookmark(const OUString& rBookmark) { - if (mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr) + if (auto pDrawViewShell = dynamic_cast<DrawViewShell *>( mpViewShell )) { - DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell); ViewShellBase& rBase (mpViewShell->GetViewShellBase()); bool bIsMasterPage = false; |