summaryrefslogtreecommitdiffstats
path: root/src/livarot/ShapeMisc.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/livarot/ShapeMisc.cpp
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.tar.gz
inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.zip
Run clang-tidy’s modernize-use-nullptr pass.
This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer.
Diffstat (limited to 'src/livarot/ShapeMisc.cpp')
-rw-r--r--src/livarot/ShapeMisc.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp
index 4f63007e7..f44a326ba 100644
--- a/src/livarot/ShapeMisc.cpp
+++ b/src/livarot/ShapeMisc.cpp
@@ -66,7 +66,7 @@ Shape::ConvertToForme (Path * dest)
// suivParc: next in the stack
for (int i = 0; i < numberOfEdges(); i++)
{
- swdData[i].misc = 0;
+ swdData[i].misc = nullptr;
swdData[i].precParc = swdData[i].suivParc = -1;
}
@@ -83,7 +83,7 @@ Shape::ConvertToForme (Path * dest)
int fi = 0;
for (fi = lastPtUsed; fi < numberOfPoints(); fi++)
{
- if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == 0)
+ if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == nullptr)
break;
}
lastPtUsed = fi + 1;
@@ -128,7 +128,7 @@ Shape::ConvertToForme (Path * dest)
if (nb < 0 || nb == curBord)
break;
}
- while (swdData[nb].misc != 0 || getEdge(nb).st != cPt);
+ while (swdData[nb].misc != nullptr || getEdge(nb).st != cPt);
if (nb < 0 || nb == curBord)
{
@@ -211,7 +211,7 @@ Shape::ConvertToForme (Path * dest, int nbP, Path * *orig, bool splitWhenForced)
for (int i = 0; i < numberOfEdges(); i++)
{
- swdData[i].misc = 0;
+ swdData[i].misc = nullptr;
swdData[i].precParc = swdData[i].suivParc = -1;
}
@@ -225,7 +225,7 @@ Shape::ConvertToForme (Path * dest, int nbP, Path * *orig, bool splitWhenForced)
int fi = 0;
for (fi = lastPtUsed; fi < numberOfPoints(); fi++)
{
- if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == 0)
+ if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == nullptr)
break;
}
lastPtUsed = fi + 1;
@@ -268,7 +268,7 @@ Shape::ConvertToForme (Path * dest, int nbP, Path * *orig, bool splitWhenForced)
if (nb < 0 || nb == curBord)
break;
}
- while (swdData[nb].misc != 0 || getEdge(nb).st != cPt);
+ while (swdData[nb].misc != nullptr || getEdge(nb).st != cPt);
if (nb < 0 || nb == curBord)
{
@@ -329,8 +329,8 @@ Shape::ConvertToForme (Path * dest, int nbP, Path * *orig, bool splitWhenForced)
void
Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*/,int &nbNest,int *&nesting,int *&contStart,bool splitWhenForced)
{
- nesting=NULL;
- contStart=NULL;
+ nesting=nullptr;
+ contStart=nullptr;
nbNest=0;
if (numberOfPoints() <= 1 || numberOfEdges() <= 1)
@@ -364,7 +364,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
for (int i = 0; i < numberOfEdges(); i++)
{
- swdData[i].misc = 0;
+ swdData[i].misc = nullptr;
swdData[i].precParc = swdData[i].suivParc = -1;
}
@@ -381,7 +381,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
int fi = 0;
for (fi = lastPtUsed; fi < numberOfPoints(); fi++)
{
- if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == 0)
+ if (getPoint(fi).incidentEdge[FIRST] >= 0 && swdData[getPoint(fi).incidentEdge[FIRST]].misc == nullptr)
break;
}
{
@@ -439,7 +439,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
if (nb < 0 || nb == curBord)
break;
}
- while (swdData[nb].misc != 0 || getEdge(nb).st != cPt);
+ while (swdData[nb].misc != nullptr || getEdge(nb).st != cPt);
if (nb < 0 || nb == curBord)
{
@@ -896,7 +896,7 @@ Shape::AddContour (Path * dest, int nbP, Path * *orig, int startBord, int curBor
int nPiece = ebData[bord].pieceID;
int nPath = ebData[bord].pathID;
- if (nPath < 0 || nPath >= nbP || orig[nPath] == NULL)
+ if (nPath < 0 || nPath >= nbP || orig[nPath] == nullptr)
{
// segment batard
dest->LineTo (getPoint(getEdge(bord).en).x);
@@ -1159,7 +1159,7 @@ Shape::ReFormeBezierTo (int bord, int /*curBord*/, Path * dest, Path * from)
int inBezier = -1, nbInterm = -1;
int typ;
typ = from->descr_cmd[nPiece]->getType();
- PathDescrBezierTo *nBData = NULL;
+ PathDescrBezierTo *nBData = nullptr;
if (typ == descr_bezierto)
{
nBData = dynamic_cast<PathDescrBezierTo *>(from->descr_cmd[nPiece]);
@@ -1220,7 +1220,7 @@ Shape::ReFormeBezierTo (int bord, int /*curBord*/, Path * dest, Path * from)
bord = swdData[bord].suivParc;
}
- g_return_val_if_fail(nBData != NULL, 0);
+ g_return_val_if_fail(nBData != nullptr, 0);
if (pe == ps)
{