aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c
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 /src/c
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 'src/c')
-rw-r--r--src/c/sk_effects.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c/sk_effects.cpp b/src/c/sk_effects.cpp
index f3a31a54bb..d3bb62cb5e 100644
--- a/src/c/sk_effects.cpp
+++ b/src/c/sk_effects.cpp
@@ -54,7 +54,7 @@ sk_shader_t* sk_shader_new_linear_gradient(const sk_point_t pts[2],
const sk_matrix_t* cmatrix) {
SkShader::TileMode mode;
if (!from_c_tilemode(cmode, &mode)) {
- return NULL;
+ return nullptr;
}
SkMatrix matrix;
if (cmatrix) {
@@ -81,7 +81,7 @@ sk_shader_t* sk_shader_new_radial_gradient(const sk_point_t* ccenter,
const sk_matrix_t* cmatrix) {
SkShader::TileMode mode;
if (!from_c_tilemode(cmode, &mode)) {
- return NULL;
+ return nullptr;
}
SkMatrix matrix;
if (cmatrix) {
@@ -125,7 +125,7 @@ sk_shader_t* sk_shader_new_two_point_conical_gradient(const sk_point_t* start,
const sk_matrix_t* cmatrix) {
SkShader::TileMode mode;
if (!from_c_tilemode(cmode, &mode)) {
- return NULL;
+ return nullptr;
}
SkMatrix matrix;
if (cmatrix) {
@@ -180,7 +180,7 @@ void sk_maskfilter_unref(sk_maskfilter_t* cfilter) {
sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t cstyle, float sigma) {
SkBlurStyle style;
if (!find_blurstyle(cstyle, &style)) {
- return NULL;
+ return nullptr;
}
return ToMaskFilter(SkBlurMaskFilter::Make(style, sigma).release());
}