diff options
author | Ben Wagner <bungeman@google.com> | 2017-08-28 10:34:05 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-28 17:48:57 +0000 |
commit | a93a14a99816d25b773f0b12868143702baf44bf (patch) | |
tree | 727e7cb88867bdc12cbcf8baa354ae3afc9444e2 /src/core/SkDraw.h | |
parent | 695db408437807d049ecc02b3b852704092728f2 (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 'src/core/SkDraw.h')
-rw-r--r-- | src/core/SkDraw.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkDraw.h b/src/core/SkDraw.h index f2941948b7..ab1fda75c7 100644 --- a/src/core/SkDraw.h +++ b/src/core/SkDraw.h @@ -39,7 +39,7 @@ public: void drawRect(const SkRect& prePaintRect, const SkPaint&, const SkMatrix* paintMatrix, const SkRect* postPaintRect) const; void drawRect(const SkRect& rect, const SkPaint& paint) const { - this->drawRect(rect, paint, NULL, NULL); + this->drawRect(rect, paint, nullptr, nullptr); } void drawRRect(const SkRRect&, const SkPaint&) const; /** @@ -57,8 +57,8 @@ public: } void drawPath(const SkPath& path, const SkPaint& paint, - SkBlitter* customBlitter = NULL) const { - this->drawPath(path, paint, NULL, false, false, customBlitter); + SkBlitter* customBlitter = nullptr) const { + this->drawPath(path, paint, nullptr, false, false, customBlitter); } /* If dstOrNull is null, computes a dst by mapping the bitmap's bounds through the matrix. */ @@ -83,10 +83,10 @@ public: * Only device A8 is supported right now. */ void drawPathCoverage(const SkPath& src, const SkPaint& paint, - SkBlitter* customBlitter = NULL) const { + SkBlitter* customBlitter = nullptr) const { bool isHairline = paint.getStyle() == SkPaint::kStroke_Style && paint.getStrokeWidth() > 0; - this->drawPath(src, paint, NULL, false, !isHairline, customBlitter); + this->drawPath(src, paint, nullptr, false, !isHairline, customBlitter); } /** Helper function that creates a mask from a path and an optional maskfilter. @@ -131,7 +131,7 @@ private: void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, bool pathIsMutable, bool drawCoverage, - SkBlitter* customBlitter = NULL) const; + SkBlitter* customBlitter = nullptr) const; void drawLine(const SkPoint[2], const SkPaint&) const; void drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawCoverage, |