Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(816)

Unified Diff: src/views/SkParsePaint.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/views/SkOSMenu.cpp ('k') | src/views/SkProgressView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkParsePaint.cpp
diff --git a/src/views/SkParsePaint.cpp b/src/views/SkParsePaint.cpp
index 5b4476423e885bca27197e53872047f686ef7f92..1a1b7067bad8f01ac405d9a948e53106fbbb7314 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)
« no previous file with comments | « src/views/SkOSMenu.cpp ('k') | src/views/SkProgressView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698