diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-07 16:10:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-07 16:35:34 +0200 |
commit | 221c65af74d2008df9e7c1a5bb89e47caf27b6a1 (patch) | |
tree | 0861916cba32937edb828d515822df3e5b98a03b /sfx2 | |
parent | 630f0a7f26e6440884dfbb24f186fe7b80d63132 (diff) |
clang-analyzer-deadcode.DeadStores
Change-Id: I08c015da8f93b2c32c8c467ee633b4cd5a71a550
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index ade4fa4a1684..a62ca784adcb 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1413,20 +1413,16 @@ void RegionData_Impl::AddEntry( const OUString& rTitle, INetURLObject::ENCODE_ALL ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); - DocTempl_EntryData_Impl* pEntry; bool bFound = false; size_t nPos = GetEntryPos( rTitle, bFound ); - if ( bFound ) - { - pEntry = maEntries[ nPos ]; - } - else + if ( !bFound ) { if ( pPos ) nPos = *pPos; - pEntry = new DocTempl_EntryData_Impl( this, rTitle ); + DocTempl_EntryData_Impl* pEntry = new DocTempl_EntryData_Impl( + this, rTitle ); pEntry->SetTargetURL( rTargetURL ); pEntry->SetHierarchyURL( aLinkURL ); if ( nPos < maEntries.size() ) { |