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

Unified Diff: src/core/SkTMultiMap.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/SkTLS.cpp ('k') | src/core/SkTextBlob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTMultiMap.h
diff --git a/src/core/SkTMultiMap.h b/src/core/SkTMultiMap.h
index c0b59ba0b9534a9a03512306efa8ebfe9eacc39e..70076f0cad2d0dc1b2cd0ab7f5df28116916a16b 100644
--- a/src/core/SkTMultiMap.h
+++ b/src/core/SkTMultiMap.h
@@ -37,7 +37,7 @@ public:
void insert(const Key& key, T* value) {
ValueList* list = fHash.find(key);
- if (NULL != list) {
+ if (list) {
// The new ValueList entry is inserted as the second element in the
// linked list, and it will contain the value of the first element.
ValueList* newEntry = SkNEW_ARGS(ValueList, (list->fValue));
@@ -57,19 +57,19 @@ public:
ValueList* list = fHash.find(key);
// Since we expect the caller to be fully aware of what is stored, just
// assert that the caller removes an existing value.
- SkASSERT(NULL != list);
+ SkASSERT(list);
ValueList* prev = NULL;
while (list->fValue != value) {
prev = list;
list = list->fNext;
}
- if (NULL != list->fNext) {
+ if (list->fNext) {
ValueList* next = list->fNext;
list->fValue = next->fValue;
list->fNext = next->fNext;
SkDELETE(next);
- } else if (NULL != prev) {
+ } else if (prev) {
prev->fNext = NULL;
SkDELETE(list);
} else {
@@ -82,7 +82,7 @@ public:
T* find(const Key& key) const {
ValueList* list = fHash.find(key);
- if (NULL != list) {
+ if (list) {
return list->fValue;
}
return NULL;
@@ -91,7 +91,7 @@ public:
template<class FindPredicate>
T* find(const Key& key, const FindPredicate f) {
ValueList* list = fHash.find(key);
- while (NULL != list) {
+ while (list) {
if (f(list->fValue)){
return list->fValue;
}
« no previous file with comments | « src/core/SkTLS.cpp ('k') | src/core/SkTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698