summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-21 19:57:19 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-21 19:58:46 +0100
commit22da27d9ddcdacaef21d667b0777052b7e817b9a (patch)
treee72e427eb7b6934b796179ed3e49ca4a8c8734a6 /sw
parentcfc2f1919f8cf856c0c884dac7e4eb83bece4a7f (diff)
Improve checking for emptiness
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx4
2 files changed, 3 insertions, 3 deletions
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<sal_uInt32>(nRet))
nRet = *rBreakArr.begin();