| 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;
|
| }
|
|
|