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

Unified Diff: src/core/SkTLList.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/core/SkTDynamicHash.h ('k') | src/core/SkTLS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTLList.h
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h
index e2b9691430ac1757a71cc417a0f7113407a50907..5cb74cf72b6cc131dc622747b48810c2ef94d33c 100644
--- a/src/core/SkTLList.h
+++ b/src/core/SkTLList.h
@@ -53,7 +53,7 @@ public:
this->validate();
typename NodeList::Iter iter;
Node* node = iter.init(fList, Iter::kHead_IterStart);
- while (NULL != node) {
+ while (node) {
SkTCast<T*>(node->fObj)->~T();
Block* block = node->fBlock;
node = iter.next();
@@ -126,7 +126,7 @@ public:
void popHead() {
this->validate();
Node* node = fList.head();
- if (NULL != node) {
+ if (node) {
this->removeNode(node);
}
this->validate();
@@ -135,7 +135,7 @@ public:
void popTail() {
this->validate();
Node* node = fList.head();
- if (NULL != node) {
+ if (node) {
this->removeNode(node);
}
this->validate();
@@ -175,7 +175,7 @@ public:
for (Iter a(*this, Iter::kHead_IterStart), b(list, Iter::kHead_IterStart);
a.get();
a.next(), b.next()) {
- SkASSERT(NULL != b.get()); // already checked that counts match.
+ SkASSERT(b.get()); // already checked that counts match.
if (!(*a.get() == *b.get())) {
return false;
}
@@ -219,7 +219,7 @@ public:
Node* getNode() { return INHERITED::get(); }
T* nodeToObj(Node* node) {
- if (NULL != node) {
+ if (node) {
return reinterpret_cast<T*>(node->fObj);
} else {
return NULL;
@@ -243,7 +243,7 @@ private:
Node* createNode() {
Node* node = fFreeList.head();
- if (NULL != node) {
+ if (node) {
fFreeList.remove(node);
++node->fBlock->fNodesInUse;
} else {
@@ -263,7 +263,7 @@ private:
}
void removeNode(Node* node) {
- SkASSERT(NULL != node);
+ SkASSERT(node);
fList.remove(node);
SkTCast<T*>(node->fObj)->~T();
if (0 == --node->fBlock->fNodesInUse) {
@@ -369,7 +369,7 @@ template <typename T>
void *operator new(size_t, SkTLList<T>* list,
typename SkTLList<T>::Placement placement,
const typename SkTLList<T>::Iter& location) {
- SkASSERT(NULL != list);
+ SkASSERT(list);
if (SkTLList<T>::kBefore_Placement == placement) {
return list->internalAddBefore(location);
} else {
« no previous file with comments | « src/core/SkTDynamicHash.h ('k') | src/core/SkTLS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698