diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-07 13:55:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-09 07:31:24 +0100 |
commit | 5ba447bdcd13ba3d7c27c8609f207910227e4ab6 (patch) | |
tree | 9a59e7058ef40be90867518590e35abb6c0615f5 /sc/source/ui/navipi/content.cxx | |
parent | ea4a47d7d442d5d897cfa3a6e9f09ce3f1f233c5 (diff) |
new loplugin simplifydynamiccast
simplify dynamic_cast followed by static_cast
Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279
Reviewed-on: https://gerrit.libreoffice.org/44460
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/navipi/content.cxx')
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 7549bb6a51e4..4b14ddf3add9 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1068,10 +1068,10 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex ) for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = rLinks[i].get(); - if (dynamic_cast<const ScAreaLink*>( pBase) != nullptr) + if (auto pAreaLink = dynamic_cast<const ScAreaLink*>( pBase)) { if (nFound == nIndex) - return static_cast<const ScAreaLink*>(pBase); + return pAreaLink; ++nFound; } } |