summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.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/common/reedsolomon/BC_ReedSolomon.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/common/reedsolomon/BC_ReedSolomon.cpp')
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
index 352dc3dab1..eac1a1065a 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;