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

Unified Diff: include/core/SkTLazy.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 | « include/core/SkTInternalLList.h ('k') | include/core/SkTemplates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTLazy.h
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h
index a291e22a137692226425776dc9efaafb860836bb..a1dc0013fc5b27ea1d6018f8e2938a68e2f30697 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();
« no previous file with comments | « include/core/SkTInternalLList.h ('k') | include/core/SkTemplates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698