aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleAAGeometry.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-28 10:34:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-28 17:48:57 +0000
commita93a14a99816d25b773f0b12868143702baf44bf (patch)
tree727e7cb88867bdc12cbcf8baa354ae3afc9444e2 /samplecode/SampleAAGeometry.cpp
parent695db408437807d049ecc02b3b852704092728f2 (diff)
Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'samplecode/SampleAAGeometry.cpp')
-rw-r--r--samplecode/SampleAAGeometry.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/samplecode/SampleAAGeometry.cpp b/samplecode/SampleAAGeometry.cpp
index 08a518ca17..5b07665129 100644
--- a/samplecode/SampleAAGeometry.cpp
+++ b/samplecode/SampleAAGeometry.cpp
@@ -758,7 +758,7 @@ struct Active {
SkScalar fEnd;
void reset() {
- fNext = NULL;
+ fNext = nullptr;
fStart = 0;
fEnd = 1;
}
@@ -836,7 +836,7 @@ public:
, fBisectButton('b')
, fJoinButton('j')
, fInOutButton('|')
- , fUndo(NULL)
+ , fUndo(nullptr)
, fActivePt(-1)
, fActiveVerb(-1)
, fHandlePathMove(true)
@@ -882,7 +882,7 @@ public:
bool constructPath() {
construct_path(fPath);
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -908,7 +908,7 @@ public:
PathUndo* next = fUndo->fNext;
delete fUndo;
fUndo = next;
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -931,7 +931,7 @@ public:
bool hideAll() {
fHideAll ^= true;
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -990,7 +990,7 @@ public:
matrix.setScale(1.f / 1.5f, 1.f / 1.5f, bounds.centerX(), bounds.centerY());
fPath.transform(matrix);
validatePath();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -1006,7 +1006,7 @@ public:
SkScalar offsetY = (this->height() - bounds.height()) / 2 - bounds.fTop;
fPath.offset(offsetX, offsetY);
validatePath();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -1016,7 +1016,7 @@ public:
matrix.setScale(1.5f, 1.5f, bounds.centerX(), bounds.centerY());
fPath.transform(matrix);
validatePath();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -1037,7 +1037,7 @@ public:
bool showLegend() {
fShowLegend ^= true;
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
@@ -1161,7 +1161,7 @@ public:
}
SkPoint maxPt;
SkVector tangent;
- SkEvalCubicAt(pts, tMax[tIndex], &maxPt, &tangent, NULL);
+ SkEvalCubicAt(pts, tMax[tIndex], &maxPt, &tangent, nullptr);
tangent.setLength(fWidthControl.fValLo * 2);
canvas->drawLine(maxPt, {maxPt.fX + tangent.fY, maxPt.fY - tangent.fX},
fSkeletonPaint);
@@ -1669,7 +1669,7 @@ public:
SkIntToScalar(click->fICurr.fY - click->fIPrev.fY));
set_path_pt(fActivePt, pt, &fPath);
validatePath();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}
case MyClick::kPathType:
@@ -1677,7 +1677,7 @@ public:
fPath.offset(SkIntToScalar(click->fICurr.fX - click->fIPrev.fX),
SkIntToScalar(click->fICurr.fY - click->fIPrev.fY));
validatePath();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
case MyClick::kVerbType: {
fActiveVerb = myClick->verbHit();
@@ -1789,7 +1789,7 @@ public:
break;
}
setControlButtonsPos();
- this->inval(NULL);
+ this->inval(nullptr);
return true;
}