From 82aa396188ec26f22fe730f4e35b5a54ebffb5dc Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 20 Jan 2017 12:59:50 -0800 Subject: Replace CFX_ByteArray with CFX_ArrayTemplate Also replace CFX_Int32Array typedef with CFX_ArrayTemplate. Removing the typedefs makes subsequent conversion to std::vector<> easier on a case-by-case basis. Review-Url: https://codereview.chromium.org/2649563003 --- xfa/fxbarcode/pdf417/BC_PDF417.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fxbarcode/pdf417/BC_PDF417.cpp') diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp index 9b8d0c149c..16ed6fdf12 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp @@ -410,7 +410,7 @@ void CBC_PDF417::generateBarcodeLogic(CFX_WideString msg, CBC_PDF417HighLevelEncoder::encodeHighLevel(msg, m_compaction, e); BC_EXCEPTION_CHECK_ReturnVoid(e); int32_t sourceCodeWords = highLevel.GetLength(); - CFX_Int32Array* dimension = + CFX_ArrayTemplate* dimension = determineDimensions(sourceCodeWords, errorCorrectionCodeWords, e); BC_EXCEPTION_CHECK_ReturnVoid(e); int32_t cols = dimension->GetAt(0); @@ -532,12 +532,12 @@ void CBC_PDF417::encodeLowLevel(CFX_WideString fullCodewords, } } -CFX_Int32Array* CBC_PDF417::determineDimensions( +CFX_ArrayTemplate* CBC_PDF417::determineDimensions( int32_t sourceCodeWords, int32_t errorCorrectionCodeWords, int32_t& e) { FX_FLOAT ratio = 0.0f; - CFX_Int32Array* dimension = nullptr; + CFX_ArrayTemplate* dimension = nullptr; for (int32_t cols = m_minCols; cols <= m_maxCols; cols++) { int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, cols); @@ -555,7 +555,7 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( } ratio = newRatio; delete dimension; - dimension = new CFX_Int32Array; + dimension = new CFX_ArrayTemplate; dimension->Add(cols); dimension->Add(rows); } @@ -563,11 +563,11 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, m_minCols); if (rows < m_minRows) { - dimension = new CFX_Int32Array; + dimension = new CFX_ArrayTemplate; dimension->Add(m_minCols); dimension->Add(m_minRows); } else if (rows >= 3 && rows <= 90) { - dimension = new CFX_Int32Array; + dimension = new CFX_ArrayTemplate; dimension->Add(m_minCols); dimension->Add(rows); } -- cgit v1.2.3