Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: xfa/fxbarcode/pdf417/BC_PDF417.cpp

Issue 2649563003: Replace CFX_ByteArray with CFX_ArrayTemplate<uint8_t> (Closed)
Patch Set: re-upload Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/pdf417/BC_PDF417.cpp
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
index 9b8d0c149cb66ec2f5185fa67dc6eeca68f80e5a..16ed6fdf12ab86e3b7d038ac7a3f9310d3673524 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);
}
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698