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

Unified Diff: tests/DequeTest.cpp

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 | « tests/DeferredCanvasTest.cpp ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DequeTest.cpp
diff --git a/tests/DequeTest.cpp b/tests/DequeTest.cpp
index 5d5dc09176d0244c22692217813a7c955cd29b2a..04b1f4010e9451bdc46151ef880da22b667a8c0c 100644
--- a/tests/DequeTest.cpp
+++ b/tests/DequeTest.cpp
@@ -19,8 +19,8 @@ static void assert_count(skiatest::Reporter* reporter, const SkDeque& deq, int c
REPORTER_ASSERT(reporter, !deq.empty());
REPORTER_ASSERT(reporter, count == deq.count());
REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize());
- REPORTER_ASSERT(reporter, NULL != deq.front());
- REPORTER_ASSERT(reporter, NULL != deq.back());
+ REPORTER_ASSERT(reporter, deq.front());
+ REPORTER_ASSERT(reporter, deq.back());
if (1 == count) {
REPORTER_ASSERT(reporter, deq.back() == deq.front());
} else {
@@ -36,7 +36,7 @@ static void assert_iter(skiatest::Reporter* reporter, const SkDeque& deq,
void* ptr;
int value = max;
- while (NULL != (ptr = iter.next())) {
+ while ((ptr = iter.next())) {
REPORTER_ASSERT(reporter, value == *(int*)ptr);
value -= 1;
}
@@ -46,7 +46,7 @@ static void assert_iter(skiatest::Reporter* reporter, const SkDeque& deq,
iter.reset(deq, SkDeque::Iter::kBack_IterStart);
value = min;
- while (NULL != (ptr = iter.prev())) {
+ while ((ptr = iter.prev())) {
REPORTER_ASSERT(reporter, value == *(int*)ptr);
value += 1;
}
@@ -57,12 +57,12 @@ static void assert_iter(skiatest::Reporter* reporter, const SkDeque& deq,
value = max;
// forward iteration half-way
- for (int i = 0; i < deq.count()/2 && NULL != (ptr = iter.next()); i++) {
+ for (int i = 0; i < deq.count()/2 && (ptr = iter.next()); i++) {
REPORTER_ASSERT(reporter, value == *(int*)ptr);
value -= 1;
}
// then back down w/ reverse iteration
- while (NULL != (ptr = iter.prev())) {
+ while ((ptr = iter.prev())) {
REPORTER_ASSERT(reporter, value == *(int*)ptr);
value += 1;
}
« no previous file with comments | « tests/DeferredCanvasTest.cpp ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698