summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-09 18:39:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-09 18:39:33 -0700
commit6dc1d7753691c0ff2f390e8ffd95a3182064487e (patch)
tree43d77664973a76c107832ae7b3c3e0f04bba1fe0 /xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp
parentfcf61b39ee597c73e80ba789833fb7fe49878422 (diff)
downloadpdfium-6dc1d7753691c0ff2f390e8ffd95a3182064487e.tar.xz
Get rid of NULLs in xfa/fxbarcode/
Review-Url: https://codereview.chromium.org/2048983002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp
index 47fbcce5d0..a41eeea472 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp
@@ -94,16 +94,16 @@ int32_t CBC_PDF417ECModulusPoly::evaluateAt(int32_t a) {
CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::add(
CBC_PDF417ECModulusPoly* other,
int32_t& e) {
- CBC_PDF417ECModulusPoly* modulusPoly = NULL;
+ CBC_PDF417ECModulusPoly* modulusPoly = nullptr;
if (isZero()) {
modulusPoly = new CBC_PDF417ECModulusPoly(other->getField(),
other->getCoefficients(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
if (other->isZero()) {
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, m_coefficients, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CFX_Int32Array smallerCoefficients;
@@ -128,34 +128,34 @@ CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::add(
largerCoefficients[i]);
}
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, sumDiff, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::subtract(
CBC_PDF417ECModulusPoly* other,
int32_t& e) {
- CBC_PDF417ECModulusPoly* modulusPoly = NULL;
+ CBC_PDF417ECModulusPoly* modulusPoly = nullptr;
if (other->isZero()) {
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, m_coefficients, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CBC_PDF417ECModulusPoly* poly = other->negative(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
modulusPoly = add(poly, e);
delete poly;
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::multiply(
CBC_PDF417ECModulusPoly* other,
int32_t& e) {
- CBC_PDF417ECModulusPoly* modulusPoly = NULL;
+ CBC_PDF417ECModulusPoly* modulusPoly = nullptr;
if (isZero() || other->isZero()) {
modulusPoly =
new CBC_PDF417ECModulusPoly(m_field->getZero()->getField(),
m_field->getZero()->getCoefficients(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CFX_Int32Array aCoefficients;
@@ -174,7 +174,7 @@ CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::multiply(
}
}
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, product, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::negative(int32_t& e) {
@@ -186,22 +186,22 @@ CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::negative(int32_t& e) {
}
CBC_PDF417ECModulusPoly* modulusPoly =
new CBC_PDF417ECModulusPoly(m_field, negativeCoefficients, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::multiply(int32_t scalar,
int32_t& e) {
- CBC_PDF417ECModulusPoly* modulusPoly = NULL;
+ CBC_PDF417ECModulusPoly* modulusPoly = nullptr;
if (scalar == 0) {
modulusPoly =
new CBC_PDF417ECModulusPoly(m_field->getZero()->getField(),
m_field->getZero()->getCoefficients(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
if (scalar == 1) {
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, m_coefficients, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}
int32_t size = m_coefficients.GetSize();
@@ -211,7 +211,7 @@ CBC_PDF417ECModulusPoly* CBC_PDF417ECModulusPoly::multiply(int32_t scalar,
product[i] = m_field->multiply(m_coefficients[i], scalar);
}
modulusPoly = new CBC_PDF417ECModulusPoly(m_field, product, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return modulusPoly;
}