From db444d2063df6c574882d9263e885c4fe1134133 Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 2 Jun 2016 15:48:15 -0700 Subject: Fix all the code which has duplicate variable declarations When there are duplicate variable declarations, the inner names shadow the outter ones. This is error prone and harder to read. Remove all the instances found by /analyze. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2027273002 --- xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp') diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp index 81abd56370..f31a54747f 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp @@ -197,9 +197,9 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorMagnitudes( FX_BOOL dataMatrix, int32_t& e) { int32_t s = errorLocations->GetSize(); - CFX_Int32Array* temp = new CFX_Int32Array; - temp->SetSize(s); - std::unique_ptr result(temp); + CFX_Int32Array* tempArray = new CFX_Int32Array; + tempArray->SetSize(s); + std::unique_ptr result(tempArray); for (int32_t i = 0; i < s; i++) { int32_t xiInverse = m_field->Inverse(errorLocations->operator[](i), e); BC_EXCEPTION_CHECK_ReturnValue(e, NULL); @@ -212,7 +212,7 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorMagnitudes( xiInverse))); } } - int32_t temp = m_field->Inverse(denominator, temp); + int32_t temp = m_field->Inverse(denominator, e); BC_EXCEPTION_CHECK_ReturnValue(e, NULL); (*result)[i] = m_field->Multiply(errorEvaluator->EvaluateAt(xiInverse), temp); -- cgit v1.2.3