aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTLazy.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-09-05 13:34:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-05 13:34:00 -0700
commit49f085dddff10473b6ebf832a974288300224e60 (patch)
tree308a3cac5e1fb053c9e27e7d07213d72eaa05409 /include/core/SkTLazy.h
parent7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff)
"NULL !=" = NULL
R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'include/core/SkTLazy.h')
-rw-r--r--include/core/SkTLazy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h
index a291e22a13..a1dc0013fc 100644
--- a/include/core/SkTLazy.h
+++ b/include/core/SkTLazy.h
@@ -88,7 +88,7 @@ public:
* Returns true if a valid object has been initialized in the SkTLazy,
* false otherwise.
*/
- bool isValid() const { return NULL != fPtr; }
+ bool isValid() const { return SkToBool(fPtr); }
/**
* Returns the object. This version should only be called when the caller
@@ -166,7 +166,7 @@ public:
* Returns a writable T*. The first time this is called the initial object is cloned.
*/
T* writable() {
- SkASSERT(NULL != fObj);
+ SkASSERT(fObj);
if (!fLazy.isValid()) {
fLazy.set(*fObj);
fObj = fLazy.get();