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

Unified Diff: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.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
Index: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
index 352dc3dab12912b288a6f71f3fbb599d9471c009..eac1a1065ab9256431c7aec29df9f84226e37092 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
@@ -39,7 +39,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonEncoder::BuildGenerator(int32_t degree,
CBC_ReedSolomonGF256Poly* lastGenerator =
m_cachedGenerators[m_cachedGenerators.GetSize() - 1];
for (int32_t d = m_cachedGenerators.GetSize(); d <= degree; d++) {
- CFX_Int32Array temp;
+ CFX_ArrayTemplate<int32_t> temp;
temp.Add(1);
temp.Add(m_field->Exp(d - 1));
CBC_ReedSolomonGF256Poly temp_poly;
@@ -54,7 +54,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonEncoder::BuildGenerator(int32_t degree,
}
return m_cachedGenerators[degree];
}
-void CBC_ReedSolomonEncoder::Encode(CFX_Int32Array* toEncode,
+void CBC_ReedSolomonEncoder::Encode(CFX_ArrayTemplate<int32_t>* toEncode,
int32_t ecBytes,
int32_t& e) {
if (ecBytes == 0) {
@@ -68,7 +68,7 @@ void CBC_ReedSolomonEncoder::Encode(CFX_Int32Array* toEncode,
}
CBC_ReedSolomonGF256Poly* generator = BuildGenerator(ecBytes, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- CFX_Int32Array infoCoefficients;
+ CFX_ArrayTemplate<int32_t> infoCoefficients;
infoCoefficients.SetSize(dataBytes);
for (int32_t x = 0; x < dataBytes; x++) {
infoCoefficients[x] = toEncode->operator[](x);
@@ -83,7 +83,7 @@ void CBC_ReedSolomonEncoder::Encode(CFX_Int32Array* toEncode,
infoTemp->Divide(generator, e));
BC_EXCEPTION_CHECK_ReturnVoid(e);
CBC_ReedSolomonGF256Poly* remainder = (*temp)[1];
- CFX_Int32Array* coefficients = remainder->GetCoefficients();
+ CFX_ArrayTemplate<int32_t>* coefficients = remainder->GetCoefficients();
int32_t numZeroCoefficients = ecBytes - coefficients->GetSize();
for (int32_t i = 0; i < numZeroCoefficients; i++) {
(*toEncode)[dataBytes + i] = 0;
« no previous file with comments | « xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h ('k') | xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698