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

Unified Diff: src/gpu/GrDrawTarget.h

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/gpu/GrDrawState.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 998f41282d9623c062b1efe8079c7687c2a380c0..814d57f326792dadcd5793f6fd130a30bc4a8b85 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -593,7 +593,7 @@ public:
bool set(GrDrawTarget* target,
int vertexCount,
int indexCount);
- bool succeeded() const { return NULL != fTarget; }
+ bool succeeded() const { return SkToBool(fTarget); }
void* vertices() const { SkASSERT(this->succeeded()); return fVertices; }
void* indices() const { SkASSERT(this->succeeded()); return fIndices; }
SkPoint* positions() const {
@@ -639,7 +639,7 @@ public:
public:
AutoGeometryPush(GrDrawTarget* target)
: fAttribRestore(target->drawState()) {
- SkASSERT(NULL != target);
+ SkASSERT(target);
fTarget = target;
target->pushGeometrySource();
}
@@ -661,7 +661,7 @@ public:
ASRInit init,
const SkMatrix* viewMatrix = NULL)
: fState(target, init, viewMatrix) {
- SkASSERT(NULL != target);
+ SkASSERT(target);
fTarget = target;
target->pushGeometrySource();
if (kPreserve_ASRInit == init) {
@@ -683,7 +683,7 @@ public:
DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) :
fDrawTarget(drawTarget), fDrawID(drawID) {}
- bool isIssued() { return NULL != fDrawTarget && fDrawTarget->isIssued(fDrawID); }
+ bool isIssued() { return fDrawTarget && fDrawTarget->isIssued(fDrawID); }
private:
GrDrawTarget* fDrawTarget;
@@ -822,7 +822,7 @@ protected:
// NULL if no copy of the dst is needed for the draw.
const GrDeviceCoordTexture* getDstCopy() const {
- if (NULL != fDstCopy.texture()) {
+ if (fDstCopy.texture()) {
return &fDstCopy;
} else {
return NULL;
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698