summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-20 12:59:50 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-20 12:59:50 -0800
commit82aa396188ec26f22fe730f4e35b5a54ebffb5dc (patch)
tree3950a96204c68fed27d1812cdd9d30de1a6226c0 /xfa/fxbarcode/pdf417/BC_PDF417.cpp
parent6db6fbcdee9f1887ac02c647210bd5013358f12d (diff)
downloadpdfium-82aa396188ec26f22fe730f4e35b5a54ebffb5dc.tar.xz
Replace CFX_ByteArray with CFX_ArrayTemplate<uint8_t>chromium/2990chromium/2989chromium/2988
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>. Removing the typedefs makes subsequent conversion to std::vector<> easier on a case-by-case basis. Review-Url: https://codereview.chromium.org/2649563003
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417.cpp')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.cpp12
1 files changed, 6 insertions, 6 deletions
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<int32_t>* 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<int32_t>* CBC_PDF417::determineDimensions(
int32_t sourceCodeWords,
int32_t errorCorrectionCodeWords,
int32_t& e) {
FX_FLOAT ratio = 0.0f;
- CFX_Int32Array* dimension = nullptr;
+ CFX_ArrayTemplate<int32_t>* 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<int32_t>;
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<int32_t>;
dimension->Add(m_minCols);
dimension->Add(m_minRows);
} else if (rows >= 3 && rows <= 90) {
- dimension = new CFX_Int32Array;
+ dimension = new CFX_ArrayTemplate<int32_t>;
dimension->Add(m_minCols);
dimension->Add(rows);
}