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

Unified Diff: tools/skpdiff/SkDiffContext.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 | « tools/skimage_main.cpp ('k') | tools/skpdiff/skpdiff_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/SkDiffContext.cpp
diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp
index 78d84009687424447f6f791b4ecea57d8c665789..3e29909987c469a4a25f1f35fe8bbdec5166b268 100644
--- a/tools/skpdiff/SkDiffContext.cpp
+++ b/tools/skpdiff/SkDiffContext.cpp
@@ -27,7 +27,7 @@ SkDiffContext::SkDiffContext() {
}
SkDiffContext::~SkDiffContext() {
- if (NULL != fDiffers) {
+ if (fDiffers) {
SkDELETE_ARRAY(fDiffers);
}
}
@@ -56,7 +56,7 @@ void SkDiffContext::setLongNames(const bool useLongNames) {
void SkDiffContext::setDiffers(const SkTDArray<SkImageDiffer*>& differs) {
// Delete whatever the last array of differs was
- if (NULL != fDiffers) {
+ if (fDiffers) {
SkDELETE_ARRAY(fDiffers);
fDiffers = NULL;
fDifferCount = 0;
@@ -306,7 +306,7 @@ void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) {
// See http://skbug.com/2713 ('make skpdiff use jsoncpp library to write out
// JSON output, instead of manual writeText() calls?')
stream.writeText(" \"records\": [\n");
- while (NULL != currentRecord) {
+ while (currentRecord) {
stream.writeText(" {\n");
SkString baselineAbsPath = get_absolute_path(currentRecord->fBaselinePath);
@@ -385,7 +385,7 @@ void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) {
currentRecord = iter.next();
// JSON does not allow trailing commas
- if (NULL != currentRecord) {
+ if (currentRecord) {
stream.writeText(",");
}
stream.writeText("\n");
@@ -408,7 +408,7 @@ void SkDiffContext::outputCsv(SkWStream& stream) {
DiffRecord* currentRecord = iter.get();
// Write CSV header and create a dictionary of all columns.
- while (NULL != currentRecord) {
+ while (currentRecord) {
for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); diffIndex++) {
DiffData& data = currentRecord->fDiffs[diffIndex];
if (!columns.find(data.fDiffName)) {
@@ -427,7 +427,7 @@ void SkDiffContext::outputCsv(SkWStream& stream) {
SkTLList<DiffRecord>::Iter iter2(fRecords, SkTLList<DiffRecord>::Iter::kHead_IterStart);
currentRecord = iter2.get();
- while (NULL != currentRecord) {
+ while (currentRecord) {
for (int i = 0; i < cntColumns; i++) {
values[i] = -1;
}
« no previous file with comments | « tools/skimage_main.cpp ('k') | tools/skpdiff/skpdiff_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698