summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-13 23:43:00 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-13 23:43:37 +0200
commit288d12ba9733443c96f92c42da26edaabd831b66 (patch)
tree3470c2f2e8ceb0f5600928896052ee9fe230be21 /sw
parentd7e5ad0bb2ef455254261f2f30a13de6a948f1ed (diff)
warning C4245 signed/unsigned mismatch
Change-Id: If6222d61a6c75996ce5c40b3eae7895982c49b4a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/swregion.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index dcd2eb342814..1f57fe12a630 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -143,8 +143,9 @@ inline SwTwips CalcArea( const SwRect &rRect )
// combine all adjacent rectangles
void SwRegionRects::Compress( bool bFuzzy )
{
- for ( size_type i = 0; i < size(); ++i )
+ for (size_type i = 0; i < size(); )
{
+ bool bRestart(false);
for ( size_type j = i+1; j < size(); ++j )
{
// If one rectangle contains a second completely than the latter
@@ -158,7 +159,7 @@ void SwRegionRects::Compress( bool bFuzzy )
{
(*this)[i] = (*this)[j];
erase( begin() + j );
- i = -1;
+ bRestart = true;
break;
}
else
@@ -180,11 +181,12 @@ void SwRegionRects::Compress( bool bFuzzy )
{
(*this)[i] = aUnion;
erase( begin() + j );
- i = -1;
+ bRestart = true;
break;
}
}
}
+ i = (bRestart) ? 0 : i+1;
}
}