diff options
author | bsalomon <bsalomon@google.com> | 2014-09-05 13:34:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-05 13:34:00 -0700 |
commit | 49f085dddff10473b6ebf832a974288300224e60 (patch) | |
tree | 308a3cac5e1fb053c9e27e7d07213d72eaa05409 /gm | |
parent | 7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff) |
"NULL !=" = NULL
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/beziereffects.cpp | 6 | ||||
-rw-r--r-- | gm/bleed.cpp | 4 | ||||
-rw-r--r-- | gm/convexpolyclip.cpp | 2 | ||||
-rw-r--r-- | gm/convexpolyeffect.cpp | 4 | ||||
-rw-r--r-- | gm/factory.cpp | 2 | ||||
-rw-r--r-- | gm/gmmain.cpp | 12 | ||||
-rw-r--r-- | gm/image.cpp | 2 | ||||
-rw-r--r-- | gm/imagefiltersgraph.cpp | 2 | ||||
-rw-r--r-- | gm/samplerstress.cpp | 4 | ||||
-rw-r--r-- | gm/xfermodes3.cpp | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index f150b7c9df..f2e09b028f 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -166,7 +166,7 @@ protected: GrTestTarget tt; context->getTestTarget(&tt); - SkASSERT(NULL != tt.target()); + SkASSERT(tt.target()); GrDrawState* drawState = tt.target()->drawState(); drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex)); @@ -321,7 +321,7 @@ protected: GrTestTarget tt; context->getTestTarget(&tt); - SkASSERT(NULL != tt.target()); + SkASSERT(tt.target()); GrDrawState* drawState = tt.target()->drawState(); drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex)); @@ -505,7 +505,7 @@ protected: GrTestTarget tt; context->getTestTarget(&tt); - SkASSERT(NULL != tt.target()); + SkASSERT(tt.target()); GrDrawState* drawState = tt.target()->drawState(); drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex)); diff --git a/gm/bleed.cpp b/gm/bleed.cpp index 99dba70d52..aa2b0df8c4 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -212,7 +212,7 @@ protected: #if SK_SUPPORT_GPU GrContext* ctx = canvas->getGrContext(); int oldMaxTextureSize = 0; - if (NULL != ctx) { + if (ctx) { // shrink the max texture size so all our textures can be reasonably sized oldMaxTextureSize = ctx->getMaxTextureSize(); ctx->setMaxTextureSizeOverride(kMaxTextureSize); @@ -244,7 +244,7 @@ protected: this->drawCase4(canvas, kCol6X, kRow3Y, SkCanvas::kBleed_DrawBitmapRectFlag, SkPaint::kHigh_FilterLevel); #if SK_SUPPORT_GPU - if (NULL != ctx) { + if (ctx) { ctx->setMaxTextureSizeOverride(oldMaxTextureSize); } #endif diff --git a/gm/convexpolyclip.cpp b/gm/convexpolyclip.cpp index 35c4426f36..328cdb5207 100644 --- a/gm/convexpolyclip.cpp +++ b/gm/convexpolyclip.cpp @@ -158,7 +158,7 @@ protected: int testLayers = kBench_Mode != this->getMode(); for (int doLayer = 0; doLayer <= testLayers; ++doLayer) { for (SkTLList<Clip>::Iter iter(fClips, SkTLList<Clip>::Iter::kHead_IterStart); - NULL != iter.get(); + iter.get(); iter.next()) { const Clip* clip = iter.get(); SkScalar x = startX; diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index 275193f326..8d73da5e4d 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp @@ -114,7 +114,7 @@ protected: SkScalar y = 0; for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_IterStart); - NULL != iter.get(); + iter.get(); iter.next()) { const SkPath* path = iter.get(); SkScalar x = 0; @@ -172,7 +172,7 @@ protected: } for (SkTLList<SkRect>::Iter iter(fRects, SkTLList<SkRect>::Iter::kHead_IterStart); - NULL != iter.get(); + iter.get(); iter.next()) { SkScalar x = 0; diff --git a/gm/factory.cpp b/gm/factory.cpp index 608c049dc3..a9bf519c00 100644 --- a/gm/factory.cpp +++ b/gm/factory.cpp @@ -32,7 +32,7 @@ protected: // Copyright-free file from http://openclipart.org/detail/29213/paper-plane-by-ddoo SkString pngFilename = GetResourcePath("plane.png"); SkAutoDataUnref data(SkData::NewFromFileName(pngFilename.c_str())); - if (NULL != data.get()) { + if (data.get()) { // Create a cache which will boot the pixels out anytime the // bitmap is unlocked. SkAutoTUnref<SkDiscardableMemoryPool> pool( diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 40d616e9f4..94df02ce4d 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -849,7 +849,7 @@ public: // If we have access to a single expected bitmap, log more // detail about the mismatch. const SkBitmap *expectedBitmapPtr = expectations.asBitmap(); - if (NULL != expectedBitmapPtr) { + if (expectedBitmapPtr) { report_bitmap_diffs(*expectedBitmapPtr, actualBitmapAndDigest.fBitmap, completeName); } @@ -1762,7 +1762,7 @@ ErrorCombination run_multiple_configs(GMMain &gmmain, GM *gm, desc.fHeight = gm->getISize().height(); desc.fSampleCnt = config.fSampleCnt; auGpuTarget.reset(gr->createUncachedTexture(desc, NULL, 0)); - if (NULL != auGpuTarget) { + if (auGpuTarget) { gpuTarget = auGpuTarget; grSuccess = true; // Set the user specified cache limits if non-default. @@ -2297,10 +2297,10 @@ int tool_main(int argc, char** argv) { if (FLAGS_writePath.count() == 1) { SkDebugf("writing to %s\n", FLAGS_writePath[0]); } - if (NULL != gmmain.fMismatchPath) { + if (gmmain.fMismatchPath) { SkDebugf("writing mismatches to %s\n", gmmain.fMismatchPath); } - if (NULL != gmmain.fMissingExpectationsPath) { + if (gmmain.fMissingExpectationsPath) { SkDebugf("writing images without expectations to %s\n", gmmain.fMissingExpectationsPath); } @@ -2324,13 +2324,13 @@ int tool_main(int argc, char** argv) { return -1; } } - if (NULL != gmmain.fMismatchPath) { + if (gmmain.fMismatchPath) { if (!prepare_subdirectories(gmmain.fMismatchPath, gmmain.fUseFileHierarchy, configs, pdfRasterizers)) { return -1; } } - if (NULL != gmmain.fMissingExpectationsPath) { + if (gmmain.fMissingExpectationsPath) { if (!prepare_subdirectories(gmmain.fMissingExpectationsPath, gmmain.fUseFileHierarchy, configs, pdfRasterizers)) { return -1; diff --git a/gm/image.cpp b/gm/image.cpp index ff184d18b3..e405a053b2 100644 --- a/gm/image.cpp +++ b/gm/image.cpp @@ -192,7 +192,7 @@ protected: canvas->translate(80, 0); test_surface(canvas, surf1, true); #if SK_SUPPORT_GPU - if (NULL != ctx) { + if (ctx) { canvas->translate(80, 0); test_surface(canvas, surf4, true); } diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp index 37ed885dd7..8af268e568 100644 --- a/gm/imagefiltersgraph.cpp +++ b/gm/imagefiltersgraph.cpp @@ -46,7 +46,7 @@ public: SkBitmap source = src; SkImageFilter* input = getInput(0); SkIPoint srcOffset = SkIPoint::Make(0, 0); - if (NULL != input && !input->filterImage(proxy, src, ctx, &source, &srcOffset)) { + if (input && !input->filterImage(proxy, src, ctx, &source, &srcOffset)) { return false; } diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp index c395b08ba1..29be6843f9 100644 --- a/gm/samplerstress.cpp +++ b/gm/samplerstress.cpp @@ -71,7 +71,7 @@ protected: } void createShader() { - if (NULL != fShader.get()) { + if (fShader.get()) { return; } @@ -83,7 +83,7 @@ protected: } void createMaskFilter() { - if (NULL != fMaskFilter.get()) { + if (fMaskFilter.get()) { return; } diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp index e3e1629298..74ca643b23 100644 --- a/gm/xfermodes3.cpp +++ b/gm/xfermodes3.cpp @@ -125,7 +125,7 @@ private: SkCanvas* tempCanvas = NULL; #if SK_SUPPORT_GPU GrContext* context = baseCanvas->getGrContext(); - if (NULL != context) { + if (context) { GrTextureDesc desc; desc.fWidth = w; desc.fHeight = h; @@ -133,7 +133,7 @@ private: desc.fFlags = kRenderTarget_GrTextureFlagBit; SkAutoTUnref<GrSurface> surface(context->createUncachedTexture(desc, NULL, 0)); SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(surface.get())); - if (NULL != device.get()) { + if (device.get()) { tempCanvas = SkNEW_ARGS(SkCanvas, (device.get())); } } |