From 5404f75a2fa863b97bdf8432f647053f0bff726e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 7 Nov 2018 09:26:57 +0200 Subject: loplugin:collapseif in sdext..svx Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sot/source/sdstor/stgdir.cxx | 5 ++--- sot/source/sdstor/storage.cxx | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 83c3f69f62fc..df077cf1d911 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -181,9 +181,8 @@ bool StgDirEntry::Store( StgDirStrm& rStrm ) if( m_pRight ) if( !static_cast(m_pRight)->Store( rStrm ) ) return false; - if( m_pDown ) - if( !m_pDown->Store( rStrm ) ) - return false; + if( m_pDown && !m_pDown->Store( rStrm ) ) + return false; return true; } diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 829dd82cb4c8..cff3520264ba 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -505,11 +505,8 @@ bool SotStorage::IsStorageFile( SvStream* pStream ) const OUString & SotStorage::GetName() const { - if( m_aName.isEmpty() ) - { - if( m_pOwnStg ) - const_cast(this)->m_aName = m_pOwnStg->GetName(); - } + if( m_aName.isEmpty() && m_pOwnStg ) + const_cast(this)->m_aName = m_pOwnStg->GetName(); return m_aName; } -- cgit