diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 09:39:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 11:10:57 +0000 |
commit | 1cc506626aa2173397e150835c1a2f08c5041490 (patch) | |
tree | 197b63ef451f0f8fcc5e6af5994b9029bcee9aa0 /lotuswordpro/source | |
parent | 0a205a7185e6d5d6cc277746e04f60278f80b859 (diff) |
coverity#1267650 Logically dead code
inspection shows they can never be null
Change-Id: Idffbed313769b232e5476a10ed4df815719606ed
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfstylecont.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx index b5f44346f733..544402ac7c7e 100644 --- a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx +++ b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx @@ -88,8 +88,7 @@ XFStyleContainer::~XFStyleContainer() for( it = m_aStyles.begin(); it != m_aStyles.end(); ++it ) { IXFStyle *pStyle = *it; - if( pStyle ) - delete pStyle; + delete pStyle; } } @@ -100,8 +99,7 @@ void XFStyleContainer::Reset() for( it = m_aStyles.begin(); it != m_aStyles.end(); ++it ) { IXFStyle *pStyle = *it; - if( pStyle ) - delete pStyle; + delete pStyle; } m_aStyles.clear(); } @@ -159,9 +157,7 @@ IXFStyle* XFStyleContainer::FindSameStyle(IXFStyle *pStyle) for( it = m_aStyles.begin(); it != m_aStyles.end(); ++it ) { IXFStyle *pConStyle = *it; - if( !pConStyle ) - continue; - + assert(pConStyle); if( pConStyle->Equal(pStyle) ) return pConStyle; } @@ -175,9 +171,7 @@ IXFStyle* XFStyleContainer::FindStyle(const OUString& name) for( it = m_aStyles.begin(); it != m_aStyles.end(); ++it ) { IXFStyle *pConStyle = *it; - if( !pConStyle ) - continue; - + assert(pConStyle); if( pConStyle->GetStyleName() == name ) return pConStyle; } @@ -202,11 +196,7 @@ void XFStyleContainer::ToXml(IXFStream *pStrm) for( it = m_aStyles.begin(); it != m_aStyles.end(); ++it ) { IXFStyle *pStyle = *it; - assert(pStyle); - if( !pStyle ) - continue; - pStyle->ToXml(pStrm); } } |