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/common/reedsolomon/BC_ReedSolomon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '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 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 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* 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 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* coefficients = remainder->GetCoefficients(); int32_t numZeroCoefficients = ecBytes - coefficients->GetSize(); for (int32_t i = 0; i < numZeroCoefficients; i++) { (*toEncode)[dataBytes + i] = 0; -- cgit v1.2.3