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

Unified Diff: src/core/SkGlyphCache.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/core/SkFlattenable.cpp ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGlyphCache.cpp
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index 3d29f9f38bb76ea6774ccd5a16f8085eedb26e9d..ab816f940707984b8c309be6e21a10bb30b76c82 100755
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -339,7 +339,7 @@ const void* SkGlyphCache::findImage(const SkGlyph& glyph) {
const_cast<SkGlyph&>(glyph).fImage = fGlyphAlloc.alloc(size,
SkChunkAlloc::kReturnNil_AllocFailType);
// check that alloc() actually succeeded
- if (NULL != glyph.fImage) {
+ if (glyph.fImage) {
fScalerContext->getImage(glyph);
// TODO: the scaler may have changed the maskformat during
// getImage (e.g. from AA or LCD to BW) which means we may have
@@ -373,10 +373,10 @@ const void* SkGlyphCache::findDistanceField(const SkGlyph& glyph) {
}
const void* image = this->findImage(glyph);
// now generate the distance field
- if (NULL != image) {
+ if (image) {
const_cast<SkGlyph&>(glyph).fDistanceField = fGlyphAlloc.alloc(size,
SkChunkAlloc::kReturnNil_AllocFailType);
- if (NULL != glyph.fDistanceField) {
+ if (glyph.fDistanceField) {
SkMask::Format maskFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
if (SkMask::kA8_Format == maskFormat) {
// make the distance field from the image
« no previous file with comments | « src/core/SkFlattenable.cpp ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698