From 22da27d9ddcdacaef21d667b0777052b7e817b9a Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 21 Jan 2012 19:57:19 +0100 Subject: Improve checking for emptiness --- sw/source/core/docnode/ndtbl.cxx | 2 +- sw/source/core/unocore/unoportenum.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index f759441830c1..0817150b20f8 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2933,7 +2933,7 @@ const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) const SwTableBox* pRet = 0; sal_uInt16 n; - if( aPosArr.size() ) + if( !aPosArr.empty() ) { for( n = 0; n < aPosArr.size(); ++n ) if( aPosArr[ n ] == nWidth ) diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 33697fc8bce8..fdfe3c698b1f 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1020,7 +1020,7 @@ lcl_GetNextIndex( SwSoftPageBreakList const & rBreakArr ) { sal_Int32 nRet = -1; - if(rBkmArr.size()) + if(!rBkmArr.empty()) { SwXBookmarkPortion_ImplSharedPtr pPtr = (*rBkmArr.begin()); nRet = pPtr->getIndex(); @@ -1032,7 +1032,7 @@ lcl_GetNextIndex( if(nRet < 0 || nTmp < nRet) nRet = nTmp; } - if(rBreakArr.size()) + if(!rBreakArr.empty()) { if(nRet < 0 || *rBreakArr.begin() < static_cast(nRet)) nRet = *rBreakArr.begin(); -- cgit