summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-09 18:39:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-09 18:39:33 -0700
commit6dc1d7753691c0ff2f390e8ffd95a3182064487e (patch)
tree43d77664973a76c107832ae7b3c3e0f04bba1fe0 /xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
parentfcf61b39ee597c73e80ba789833fb7fe49878422 (diff)
downloadpdfium-6dc1d7753691c0ff2f390e8ffd95a3182064487e.tar.xz
Get rid of NULLs in xfa/fxbarcode/
Review-Url: https://codereview.chromium.org/2048983002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp b/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
index 6c217621b2..064f6cc30b 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
@@ -57,7 +57,7 @@ CBC_PDF417DetectorResult* CBC_Detector::detect(CBC_BinaryBitmap* image,
FX_BOOL multiple,
int32_t& e) {
CBC_CommonBitMatrix* bitMatrix = image->GetBlackMatrix(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_ResultPointArrayArray* barcodeCoordinates = detect(multiple, bitMatrix);
if (barcodeCoordinates->GetSize() == 0) {
rotate180(bitMatrix);
@@ -65,7 +65,7 @@ CBC_PDF417DetectorResult* CBC_Detector::detect(CBC_BinaryBitmap* image,
}
if (barcodeCoordinates->GetSize() == 0) {
e = BCExceptionUnSupportedBarcode;
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
}
return new CBC_PDF417DetectorResult(bitMatrix, barcodeCoordinates);
}
@@ -115,7 +115,7 @@ CBC_ResultPointArrayArray* CBC_Detector::detect(
FX_BOOL foundBarcodeInRow = FALSE;
while (row < bitMatrix->GetHeight()) {
CBC_ResultPointArray* vertices = findVertices(bitMatrix, row, column);
- if (vertices->GetAt(0) == NULL && vertices->GetAt(3) == NULL) {
+ if (!vertices->GetAt(0) && !vertices->GetAt(3)) {
if (!foundBarcodeInRow) {
delete vertices;
break;
@@ -255,7 +255,7 @@ CBC_ResultPointArray* CBC_Detector::findRowsWithPattern(
}
if (stopRow - startRow < BARCODE_MIN_HEIGHT) {
for (int32_t i = 0; i < result->GetSize(); i++) {
- result->SetAt(i, NULL);
+ result->SetAt(i, nullptr);
}
}
return result;
@@ -316,7 +316,7 @@ CFX_Int32Array* CBC_Detector::findGuardPattern(CBC_CommonBitMatrix* matrix,
}
}
delete intarray;
- return NULL;
+ return nullptr;
}
int32_t CBC_Detector::patternMatchVariance(CFX_Int32Array& counters,
int32_t* pattern,