diff options
author | tsepez <tsepez@chromium.org> | 2016-05-02 09:34:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-02 09:34:35 -0700 |
commit | 8f0d0da1b12e29133fb48a778603c03bf0056124 (patch) | |
tree | eacee99738a238d488c74723fef01a6b5c2f485d /xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp | |
parent | a86d113be692153d7707da377d11d4f09cb12c9b (diff) | |
download | pdfium-8f0d0da1b12e29133fb48a778603c03bf0056124.tar.xz |
Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 10
Review-Url: https://codereview.chromium.org/1936733002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp b/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp index 557d50d951..4b68bdf678 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp @@ -24,27 +24,25 @@ #include "xfa/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h" -CBC_PDF417DetectorResult::CBC_PDF417DetectorResult(CBC_CommonBitMatrix* bits, - CFX_PtrArray* points) { - m_bits = bits; - m_points = points; -} +CBC_PDF417DetectorResult::CBC_PDF417DetectorResult( + CBC_CommonBitMatrix* bits, + CBC_ResultPointArrayArray* points) + : m_bits(bits), m_points(points) {} + CBC_PDF417DetectorResult::~CBC_PDF417DetectorResult() { for (int32_t i = 0; i < m_points->GetSize(); i++) { - CFX_PtrArray* temp = (CFX_PtrArray*)m_points->GetAt(i); - for (int32_t j = 0; j < temp->GetSize(); j++) { - delete (CBC_ResultPoint*)temp->GetAt(j); - } - temp->RemoveAll(); + CBC_ResultPointArray* temp = m_points->GetAt(i); + for (int32_t j = 0; j < temp->GetSize(); j++) + delete temp->GetAt(j); + delete temp; } - m_points->RemoveAll(); - delete m_points; } -CBC_CommonBitMatrix* CBC_PDF417DetectorResult::getBits() { + +CBC_CommonBitMatrix* CBC_PDF417DetectorResult::getBits() const { return m_bits; } -CFX_PtrArray* CBC_PDF417DetectorResult::getPoints() { - return m_points; +CBC_ResultPointArrayArray* CBC_PDF417DetectorResult::getPoints() const { + return m_points.get(); } |