diff options
author | tsepez <tsepez@chromium.org> | 2016-04-28 15:16:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 15:16:51 -0700 |
commit | 33a747db5c9ce18bdfaaaaea17b03ef26d14ff54 (patch) | |
tree | 9d8249844ea44f432891ffa67d7bca51bdb1f033 /xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp | |
parent | 18713d20e080c344e0ed09e3f0ac5bacb0645fc5 (diff) | |
download | pdfium-33a747db5c9ce18bdfaaaaea17b03ef26d14ff54.tar.xz |
Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, Part 5
Remove unused m_pdf417byteSegments, which was coped into from
an empty array and never again referenced.
Review-Url: https://codereview.chromium.org/1927253002
Diffstat (limited to 'xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp')
-rw-r--r-- | xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp b/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp index 8c462bf328..75565ca641 100644 --- a/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp +++ b/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp @@ -40,12 +40,12 @@ CBC_QRAlignmentPatternFinder::CBC_QRAlignmentPatternFinder( m_moduleSize(moduleSize) { m_crossCheckStateCount.SetSize(3); } + CBC_QRAlignmentPatternFinder::~CBC_QRAlignmentPatternFinder() { - for (int32_t i = 0; i < m_possibleCenters.GetSize(); i++) { - delete (CBC_QRAlignmentPattern*)m_possibleCenters[i]; - } - m_possibleCenters.RemoveAll(); + for (int32_t i = 0; i < m_possibleCenters.GetSize(); i++) + delete m_possibleCenters[i]; } + CBC_QRAlignmentPattern* CBC_QRAlignmentPatternFinder::Find(int32_t& e) { int32_t startX = m_startX; int32_t height = m_height; @@ -102,7 +102,7 @@ CBC_QRAlignmentPattern* CBC_QRAlignmentPatternFinder::Find(int32_t& e) { } } if (m_possibleCenters.GetSize() != 0) { - return ((CBC_QRAlignmentPattern*)(m_possibleCenters[0]))->Clone(); + return m_possibleCenters[0]->Clone(); } e = BCExceptionRead; BC_EXCEPTION_CHECK_ReturnValue(e, NULL); @@ -186,8 +186,7 @@ CBC_QRAlignmentPattern* CBC_QRAlignmentPatternFinder::HandlePossibleCenter( (FX_FLOAT)(stateCount[0] + stateCount[1] + stateCount[2]) / 3.0f; int32_t max = m_possibleCenters.GetSize(); for (int32_t index = 0; index < max; index++) { - CBC_QRAlignmentPattern* center = - (CBC_QRAlignmentPattern*)(m_possibleCenters[index]); + CBC_QRAlignmentPattern* center = m_possibleCenters[index]; if (center->AboutEquals(estimatedModuleSize, centerI, centerJ)) { return new CBC_QRAlignmentPattern(centerJ, centerI, estimatedModuleSize); |