[Libreoffice-commits] .: sw/source
Michael Meeks
michael at kemper.freedesktop.org
Tue Apr 26 07:29:46 PDT 2011
sw/source/core/access/accportions.cxx | 2 +-
sw/source/core/crsr/crsrsh.cxx | 2 +-
sw/source/core/crsr/viscrs.cxx | 2 +-
sw/source/core/doc/docnum.cxx | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 37e78c376fc74696c048444d361309f0abc7c0b4
Author: Kayo Hamid <kayo.hamid at gekkolinux.com.br>
Date: Fri Apr 22 23:42:16 2011 -0400
inefficient emptiness check
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index d3e59f5..36cf5a4 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -227,7 +227,7 @@ void SwAccessiblePortionData::LineBreak()
void SwAccessiblePortionData::Skip(sal_uInt16 nLength)
{
DBG_ASSERT( !bFinished, "We are already done!" );
- DBG_ASSERT( aModelPositions.size() == 0, "Never Skip() after portions" );
+ DBG_ASSERT( aModelPositions.empty(), "Never Skip() after portions" );
DBG_ASSERT( nLength <= pTxtNode->GetTxt().Len(), "skip exceeds model string!" );
nModelPosition += nLength;
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index c62c923..fc2f5a3 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3268,7 +3268,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
}
}
- if ( aSmartTagTypes.size() )
+ if ( !aSmartTagTypes.empty() )
{
rSmartTagTypes.realloc( aSmartTagTypes.size() );
rStringKeyMaps.realloc( aSmartTagTypes.size() );
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 83796c3..5f4f749 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -339,7 +339,7 @@ void SwSelPaintRects::Show()
if(mpCursorOverlay)
{
- if(aNewRanges.size())
+ if(!aNewRanges.empty())
{
static_cast< sdr::overlay::OverlaySelection* >(mpCursorOverlay)->setRanges(aNewRanges);
}
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 0b528d4..6112a42 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1067,7 +1067,7 @@ sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
++aListIter;
}
- while ( aListsForDeletion.size() > 0 )
+ while ( !aListsForDeletion.empty() )
{
SwList* pList = aListsForDeletion.back();
aListsForDeletion.pop_back();
More information about the Libreoffice-commits
mailing list