diff options
author | tsepez <tsepez@chromium.org> | 2016-04-29 13:45:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-29 13:45:14 -0700 |
commit | e801d4e064690fbe1815d25d220cfbca79976a4f (patch) | |
tree | c7955761755597d8430b70f2e477d7b7a272f46b /xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp | |
parent | e7ca8ba0f76d175eb89e4cc3aa3aa2743711414e (diff) | |
download | pdfium-e801d4e064690fbe1815d25d220cfbca79976a4f.tar.xz |
Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 9
Converted one place to unique_ptr to avoid redundant cleanup.
Review-Url: https://codereview.chromium.org/1937593002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp index 6ae68d72f3..e0eaf3e91f 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp @@ -229,7 +229,8 @@ CBC_BoundingBox* CBC_PDF417ScanningDecoder::adjustBoundingBox( break; } } - CFX_PtrArray* codewords = rowIndicatorColumn->getCodewords(); + CFX_ArrayTemplate<CBC_Codeword*>* codewords = + rowIndicatorColumn->getCodewords(); for (int32_t row = 0; missingStartRows > 0 && codewords->GetAt(row) == NULL; row++) { missingStartRows--; @@ -484,9 +485,10 @@ CFX_PtrArray* CBC_PDF417ScanningDecoder::createBarcodeMatrix( if (detectionResultColumn == NULL) { continue; } - CFX_PtrArray* temp = detectionResultColumn->getCodewords(); + CFX_ArrayTemplate<CBC_Codeword*>* temp = + detectionResultColumn->getCodewords(); for (int32_t l = 0; l < temp->GetSize(); l++) { - CBC_Codeword* codeword = (CBC_Codeword*)temp->GetAt(l); + CBC_Codeword* codeword = temp->GetAt(l); if (codeword == NULL || codeword->getRowNumber() == -1) { continue; } |