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

Unified Diff: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp

Issue 2048983002: Get rid of NULLs in xfa/fxbarcode/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 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_ReedSolomonDecoder.cpp
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
index f31a54747f77cb3c6e29b76a34d18850b86ea2f2..8788afbda8ef6d1ccb155898bb83dd4ee55f79a3 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
@@ -181,13 +181,13 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorLocations(
for (int32_t i = 1; i < 256 && ie < numErrors; i++) {
if (errorLocator->EvaluateAt(i) == 0) {
(*result)[ie] = m_field->Inverse(i, ie);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
ie++;
}
}
if (ie != numErrors) {
e = BCExceptionDegreeNotMatchRoots;
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
}
return result.release();
}
@@ -202,7 +202,7 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorMagnitudes(
std::unique_ptr<CFX_Int32Array> 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);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
int32_t denominator = 1;
for (int32_t j = 0; j < s; j++) {
if (i != j) {
@@ -213,7 +213,7 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorMagnitudes(
}
}
int32_t temp = m_field->Inverse(denominator, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
(*result)[i] =
m_field->Multiply(errorEvaluator->EvaluateAt(xiInverse), temp);
}
« no previous file with comments | « xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp ('k') | xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698