summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-06-06 22:40:37 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-06-06 22:41:07 +0200
commitc9e4cc279371a87495bfbc7c52f56686f9ab42c9 (patch)
tree4873a45c425c980404253267c981524ed00cbe7d /basegfx/source/polygon
parent633178bffaf23ae322060e2c304c9c2cf12b46cc (diff)
Some cppcheck cleaning
Change-Id: I7a5f34715faecd689900b5d41eae9c782e99b47b
Diffstat (limited to 'basegfx/source/polygon')
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index cf28c909a87a..b68cd6fe2a66 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -619,7 +619,6 @@ namespace basegfx
if(nPointCount)
{
B2DPolyPolygon aRetval;
- const bool bEventuallyCreateLineJoin(B2DLINEJOIN_NONE != eJoin);
const bool bIsClosed(aCandidate.isClosed());
const sal_uInt32 nEdgeCount(bIsClosed ? nPointCount : nPointCount - 1);
@@ -628,6 +627,7 @@ namespace basegfx
B2DCubicBezier aEdge;
B2DCubicBezier aPrev;
+ const bool bEventuallyCreateLineJoin(B2DLINEJOIN_NONE != eJoin);
// prepare edge
aEdge.setStartPoint(aCandidate.getB2DPoint(0));
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 73a01be154d2..ca3f7c6fcdad 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -563,7 +563,6 @@ namespace basegfx
{
rCandidate.getBezierSegment(b, aCubicB);
aCubicB.testAndSolveTrivialBezier();
- const bool bEdgeBIsCurve(aCubicB.isBezier());
const B2DRange aRangeB(aCubicB.getRange());
// only overlapping segments need to be tested
@@ -575,6 +574,7 @@ namespace basegfx
bOverlap = aRangeA.overlapsMore(aRangeB);
if( bOverlap)
{
+ const bool bEdgeBIsCurve(aCubicB.isBezier());
if(bEdgeAIsCurve && bEdgeBIsCurve)
{
// test for bezier-bezier cuts
@@ -816,7 +816,6 @@ namespace basegfx
{
rCandidateB.getBezierSegment(b, aCubicB);
aCubicB.testAndSolveTrivialBezier();
- const bool bEdgeBIsCurve(aCubicB.isBezier());
const B2DRange aRangeB(aCubicB.getRange());
// consecutive segments touch of course
@@ -827,6 +826,7 @@ namespace basegfx
bOverlap = aRangeA.overlapsMore(aRangeB);
if( bOverlap)
{
+ const bool bEdgeBIsCurve(aCubicB.isBezier());
if(bEdgeAIsCurve && bEdgeBIsCurve)
{
// test for bezier-bezier cuts
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index babc779e2144..baae69a3ab62 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3066,10 +3066,10 @@ namespace basegfx
}
const bool bHasWidth(!fTools::equalZero(fWaveWidth));
- const bool bHasHeight(!fTools::equalZero(fWaveHeight));
if(bHasWidth)
{
+ const bool bHasHeight(!fTools::equalZero(fWaveHeight));
if(bHasHeight)
{
// width and height, create waveline. First subdivide to reduce input to line segments
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index b5a0868f250b..522bc3701556 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -903,7 +903,7 @@ namespace basegfx
// first step: prepareForPolygonOperation and simple merge of non-overlapping
// PolyPolygons for speedup; this is possible for the wanted OR-operation
- if(aInput.size())
+ if(!aInput.empty())
{
std::vector< basegfx::B2DPolyPolygon > aResult;
aResult.reserve(aInput.size());
@@ -912,7 +912,7 @@ namespace basegfx
{
const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a]));
- if(aResult.size())
+ if(!aResult.empty())
{
const B2DRange aCandidateRange(aCandidate.getB2DRange());
bool bCouldMergeSimple(false);