diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-28 12:06:45 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-28 19:22:50 +0000 |
commit | 8b6186f89002099d406508acecf4bccc4ef64c95 (patch) | |
tree | df104ee415cfa90a53a23b88f1f66c3c2fd8d84e /xfa/fxbarcode/pdf417/BC_PDF417.cpp | |
parent | b0baff546bdcd911c80007829d9af5f05d0c04b0 (diff) | |
download | pdfium-8b6186f89002099d406508acecf4bccc4ef64c95.tar.xz |
Remove CFX_ArrayTemplate from FX barcode code.
This is now the last usage in pdfium, types to be removed
in a follow-on CL.
Change-Id: I16f67eb3eb99f21bb231829168203be125129ad7
Reviewed-on: https://pdfium-review.googlesource.com/3247
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp index f7aad69953..0bc6680108 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp @@ -412,12 +412,12 @@ void CBC_PDF417::generateBarcodeLogic(CFX_WideString msg, if (e != BCExceptionNO) return; int32_t sourceCodeWords = highLevel.GetLength(); - CFX_ArrayTemplate<int32_t>* dimension = + std::vector<int32_t>* dimension = determineDimensions(sourceCodeWords, errorCorrectionCodeWords, e); if (e != BCExceptionNO) return; - int32_t cols = dimension->GetAt(0); - int32_t rows = dimension->GetAt(1); + int32_t cols = (*dimension)[0]; + int32_t rows = (*dimension)[1]; delete dimension; int32_t pad = getNumberOfPadCodewords(sourceCodeWords, errorCorrectionCodeWords, cols, rows); @@ -536,12 +536,12 @@ void CBC_PDF417::encodeLowLevel(CFX_WideString fullCodewords, } } -CFX_ArrayTemplate<int32_t>* CBC_PDF417::determineDimensions( +std::vector<int32_t>* CBC_PDF417::determineDimensions( int32_t sourceCodeWords, int32_t errorCorrectionCodeWords, int32_t& e) { float ratio = 0.0f; - CFX_ArrayTemplate<int32_t>* dimension = nullptr; + std::vector<int32_t>* dimension = nullptr; for (int32_t cols = m_minCols; cols <= m_maxCols; cols++) { int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, cols); @@ -559,21 +559,21 @@ CFX_ArrayTemplate<int32_t>* CBC_PDF417::determineDimensions( } ratio = newRatio; delete dimension; - dimension = new CFX_ArrayTemplate<int32_t>; - dimension->Add(cols); - dimension->Add(rows); + dimension = new std::vector<int32_t>; + dimension->push_back(cols); + dimension->push_back(rows); } if (!dimension) { int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, m_minCols); if (rows < m_minRows) { - dimension = new CFX_ArrayTemplate<int32_t>; - dimension->Add(m_minCols); - dimension->Add(m_minRows); + dimension = new std::vector<int32_t>; + dimension->push_back(m_minCols); + dimension->push_back(m_minRows); } else if (rows >= 3 && rows <= 90) { - dimension = new CFX_ArrayTemplate<int32_t>; - dimension->Add(m_minCols); - dimension->Add(rows); + dimension = new std::vector<int32_t>; + dimension->push_back(m_minCols); + dimension->push_back(rows); } } if (!dimension) { |