diff options
author | 2015-08-27 07:41:13 -0700 | |
---|---|---|
committer | 2015-08-27 07:41:16 -0700 | |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/views/SkParsePaint.cpp | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/views/SkParsePaint.cpp')
-rw-r--r-- | src/views/SkParsePaint.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/views/SkParsePaint.cpp b/src/views/SkParsePaint.cpp index 5b4476423e..1a1b7067ba 100644 --- a/src/views/SkParsePaint.cpp +++ b/src/views/SkParsePaint.cpp @@ -13,8 +13,8 @@ static SkShader* inflate_shader(const SkDOM& dom, const SkDOM::Node* node) { - if ((node = dom.getFirstChild(node, "shader")) == NULL) - return NULL; + if ((node = dom.getFirstChild(node, "shader")) == nullptr) + return nullptr; const char* str; @@ -24,9 +24,9 @@ static SkShader* inflate_shader(const SkDOM& dom, const SkDOM::Node* node) SkPoint pts[2]; colors[0] = colors[1] = SK_ColorBLACK; // need to initialized the alpha to opaque, since FindColor doesn't set it - if ((str = dom.findAttr(node, "c0")) != NULL && + if ((str = dom.findAttr(node, "c0")) != nullptr && SkParse::FindColor(str, &colors[0]) && - (str = dom.findAttr(node, "c1")) != NULL && + (str = dom.findAttr(node, "c1")) != nullptr && SkParse::FindColor(str, &colors[1]) && dom.findScalars(node, "p0", &pts[0].fX, 2) && dom.findScalars(node, "p1", &pts[1].fX, 2)) @@ -36,13 +36,13 @@ static SkShader* inflate_shader(const SkDOM& dom, const SkDOM::Node* node) if ((index = dom.findList(node, "tile-mode", "clamp,repeat,mirror")) >= 0) mode = (SkShader::TileMode)index; - return SkGradientShader::CreateLinear(pts, colors, NULL, 2, mode); + return SkGradientShader::CreateLinear(pts, colors, nullptr, 2, mode); } } else if (dom.hasAttr(node, "type", "bitmap")) { - if ((str = dom.findAttr(node, "src")) == NULL) - return NULL; + if ((str = dom.findAttr(node, "src")) == nullptr) + return nullptr; SkBitmap bm; @@ -57,7 +57,7 @@ static SkShader* inflate_shader(const SkDOM& dom, const SkDOM::Node* node) return SkShader::CreateBitmapShader(bm, mode, mode); } } - return NULL; + return nullptr; } void SkPaint_Inflate(SkPaint* paint, const SkDOM& dom, const SkDOM::Node* node) |