diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/flditem.cxx | 10 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 14 |
2 files changed, 9 insertions, 15 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index c2a7e5d12412..b308abe0e1ec 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -358,14 +358,12 @@ bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" ); const SvxFieldData* pOtherFld = static_cast<const SvxFieldItem&>(rItem).GetField(); - if ( !pField && !pOtherFld ) + if( pField == pOtherFld ) return true; - - if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) ) + if( pOtherFld == nullptr ) return false; - - return ( ( pField->Type() == pOtherFld->Type() ) - && ( *pField == *pOtherFld ) ); + return ( pField->Type() == pOtherFld->Type() ) + && ( *pField == *pOtherFld ); } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 25c2fcc9b97f..1b8912d29b4d 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1664,15 +1664,11 @@ SvxBoxItem& SvxBoxItem::operator=( const SvxBoxItem& rBox ) inline bool CmpBrdLn( const SvxBorderLine* pBrd1, const SvxBorderLine* pBrd2 ) { - bool bRet; - if( 0 != pBrd1 ? 0 == pBrd2 : 0 != pBrd2 ) - bRet = false; - else - if( !pBrd1 ) - bRet = true; - else - bRet = (*pBrd1 == *pBrd2); - return bRet; + if( pBrd1 == pBrd2 ) + return true; + if( pBrd1 == nullptr ) + return false; + return *pBrd1 == *pBrd2; } |