Some cppcheck cleaning
Change-Id: I7a5f34715faecd689900b5d41eae9c782e99b47b
This commit is contained in:
@@ -619,7 +619,6 @@ namespace basegfx
|
|||||||
if(nPointCount)
|
if(nPointCount)
|
||||||
{
|
{
|
||||||
B2DPolyPolygon aRetval;
|
B2DPolyPolygon aRetval;
|
||||||
const bool bEventuallyCreateLineJoin(B2DLINEJOIN_NONE != eJoin);
|
|
||||||
const bool bIsClosed(aCandidate.isClosed());
|
const bool bIsClosed(aCandidate.isClosed());
|
||||||
const sal_uInt32 nEdgeCount(bIsClosed ? nPointCount : nPointCount - 1);
|
const sal_uInt32 nEdgeCount(bIsClosed ? nPointCount : nPointCount - 1);
|
||||||
|
|
||||||
@@ -628,6 +627,7 @@ namespace basegfx
|
|||||||
B2DCubicBezier aEdge;
|
B2DCubicBezier aEdge;
|
||||||
B2DCubicBezier aPrev;
|
B2DCubicBezier aPrev;
|
||||||
|
|
||||||
|
const bool bEventuallyCreateLineJoin(B2DLINEJOIN_NONE != eJoin);
|
||||||
// prepare edge
|
// prepare edge
|
||||||
aEdge.setStartPoint(aCandidate.getB2DPoint(0));
|
aEdge.setStartPoint(aCandidate.getB2DPoint(0));
|
||||||
|
|
||||||
|
@@ -563,7 +563,6 @@ namespace basegfx
|
|||||||
{
|
{
|
||||||
rCandidate.getBezierSegment(b, aCubicB);
|
rCandidate.getBezierSegment(b, aCubicB);
|
||||||
aCubicB.testAndSolveTrivialBezier();
|
aCubicB.testAndSolveTrivialBezier();
|
||||||
const bool bEdgeBIsCurve(aCubicB.isBezier());
|
|
||||||
const B2DRange aRangeB(aCubicB.getRange());
|
const B2DRange aRangeB(aCubicB.getRange());
|
||||||
|
|
||||||
// only overlapping segments need to be tested
|
// only overlapping segments need to be tested
|
||||||
@@ -575,6 +574,7 @@ namespace basegfx
|
|||||||
bOverlap = aRangeA.overlapsMore(aRangeB);
|
bOverlap = aRangeA.overlapsMore(aRangeB);
|
||||||
if( bOverlap)
|
if( bOverlap)
|
||||||
{
|
{
|
||||||
|
const bool bEdgeBIsCurve(aCubicB.isBezier());
|
||||||
if(bEdgeAIsCurve && bEdgeBIsCurve)
|
if(bEdgeAIsCurve && bEdgeBIsCurve)
|
||||||
{
|
{
|
||||||
// test for bezier-bezier cuts
|
// test for bezier-bezier cuts
|
||||||
@@ -816,7 +816,6 @@ namespace basegfx
|
|||||||
{
|
{
|
||||||
rCandidateB.getBezierSegment(b, aCubicB);
|
rCandidateB.getBezierSegment(b, aCubicB);
|
||||||
aCubicB.testAndSolveTrivialBezier();
|
aCubicB.testAndSolveTrivialBezier();
|
||||||
const bool bEdgeBIsCurve(aCubicB.isBezier());
|
|
||||||
const B2DRange aRangeB(aCubicB.getRange());
|
const B2DRange aRangeB(aCubicB.getRange());
|
||||||
|
|
||||||
// consecutive segments touch of course
|
// consecutive segments touch of course
|
||||||
@@ -827,6 +826,7 @@ namespace basegfx
|
|||||||
bOverlap = aRangeA.overlapsMore(aRangeB);
|
bOverlap = aRangeA.overlapsMore(aRangeB);
|
||||||
if( bOverlap)
|
if( bOverlap)
|
||||||
{
|
{
|
||||||
|
const bool bEdgeBIsCurve(aCubicB.isBezier());
|
||||||
if(bEdgeAIsCurve && bEdgeBIsCurve)
|
if(bEdgeAIsCurve && bEdgeBIsCurve)
|
||||||
{
|
{
|
||||||
// test for bezier-bezier cuts
|
// test for bezier-bezier cuts
|
||||||
|
@@ -3066,10 +3066,10 @@ namespace basegfx
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool bHasWidth(!fTools::equalZero(fWaveWidth));
|
const bool bHasWidth(!fTools::equalZero(fWaveWidth));
|
||||||
const bool bHasHeight(!fTools::equalZero(fWaveHeight));
|
|
||||||
|
|
||||||
if(bHasWidth)
|
if(bHasWidth)
|
||||||
{
|
{
|
||||||
|
const bool bHasHeight(!fTools::equalZero(fWaveHeight));
|
||||||
if(bHasHeight)
|
if(bHasHeight)
|
||||||
{
|
{
|
||||||
// width and height, create waveline. First subdivide to reduce input to line segments
|
// width and height, create waveline. First subdivide to reduce input to line segments
|
||||||
|
@@ -903,7 +903,7 @@ namespace basegfx
|
|||||||
|
|
||||||
// first step: prepareForPolygonOperation and simple merge of non-overlapping
|
// first step: prepareForPolygonOperation and simple merge of non-overlapping
|
||||||
// PolyPolygons for speedup; this is possible for the wanted OR-operation
|
// PolyPolygons for speedup; this is possible for the wanted OR-operation
|
||||||
if(aInput.size())
|
if(!aInput.empty())
|
||||||
{
|
{
|
||||||
std::vector< basegfx::B2DPolyPolygon > aResult;
|
std::vector< basegfx::B2DPolyPolygon > aResult;
|
||||||
aResult.reserve(aInput.size());
|
aResult.reserve(aInput.size());
|
||||||
@@ -912,7 +912,7 @@ namespace basegfx
|
|||||||
{
|
{
|
||||||
const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a]));
|
const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a]));
|
||||||
|
|
||||||
if(aResult.size())
|
if(!aResult.empty())
|
||||||
{
|
{
|
||||||
const B2DRange aCandidateRange(aCandidate.getB2DRange());
|
const B2DRange aCandidateRange(aCandidate.getB2DRange());
|
||||||
bool bCouldMergeSimple(false);
|
bool bCouldMergeSimple(false);
|
||||||
|
@@ -329,11 +329,10 @@ namespace basegfx
|
|||||||
// unconditionally
|
// unconditionally
|
||||||
append(aIntersectionPoint);
|
append(aIntersectionPoint);
|
||||||
|
|
||||||
const bool isSweepLineEnteringRect(
|
|
||||||
rEvent.getEdgeType() == SweepLineEvent::STARTING_EDGE);
|
|
||||||
if( isFinishingEdge )
|
if( isFinishingEdge )
|
||||||
{
|
{
|
||||||
if( isSweepLineEnteringRect )
|
// isSweepLineEnteringRect ?
|
||||||
|
if( rEvent.getEdgeType() == SweepLineEvent::STARTING_EDGE)
|
||||||
handleFinalOwnRightEdge(rActiveEdge);
|
handleFinalOwnRightEdge(rActiveEdge);
|
||||||
else
|
else
|
||||||
handleFinalOwnLeftEdge(rActiveEdge,
|
handleFinalOwnLeftEdge(rActiveEdge,
|
||||||
|
@@ -232,7 +232,7 @@ bool Impl_calcSafeParams( double& t1,
|
|||||||
{
|
{
|
||||||
// calc intersection of convex hull segment with
|
// calc intersection of convex hull segment with
|
||||||
// one of the horizontal bounds lines
|
// one of the horizontal bounds lines
|
||||||
const double r_x( p1.x - p0.x );
|
// to optimize a bit, r_x is calculated only in else case
|
||||||
const double r_y( p1.y - p0.y );
|
const double r_y( p1.y - p0.y );
|
||||||
|
|
||||||
if( tolZero(r_y) )
|
if( tolZero(r_y) )
|
||||||
@@ -252,6 +252,7 @@ bool Impl_calcSafeParams( double& t1,
|
|||||||
{
|
{
|
||||||
// check against lower and higher bounds
|
// check against lower and higher bounds
|
||||||
// =====================================
|
// =====================================
|
||||||
|
const double r_x( p1.x - p0.x );
|
||||||
|
|
||||||
// calc intersection with horizontal dMin line
|
// calc intersection with horizontal dMin line
|
||||||
const double currTLow( (lowerYBound - p0.y) * r_x / r_y + p0.x );
|
const double currTLow( (lowerYBound - p0.y) * r_x / r_y + p0.x );
|
||||||
|
Reference in New Issue
Block a user