summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/common/reedsolomon
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/common/reedsolomon')
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp6
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp9
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp3
3 files changed, 6 insertions, 12 deletions
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
index 25b4c852c1..7698890366 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
@@ -61,14 +61,12 @@ void CBC_ReedSolomonEncoder::Encode(CFX_ArrayTemplate<int32_t>* toEncode,
int32_t& e) {
if (ecBytes == 0) {
e = BCExceptionNoCorrectionBytes;
- if (e != BCExceptionNO)
- return;
+ return;
}
int32_t dataBytes = toEncode->GetSize() - ecBytes;
if (dataBytes <= 0) {
e = BCExceptionNoDataBytesProvided;
- if (e != BCExceptionNO)
- return;
+ return;
}
CBC_ReedSolomonGF256Poly* generator = BuildGenerator(ecBytes, e);
if (e != BCExceptionNO)
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
index 0fe215bd09..ce84d8e08d 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
@@ -78,8 +78,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256::BuildMonomial(
int32_t& e) {
if (degree < 0) {
e = BCExceptionDegreeIsNegative;
- if (e != BCExceptionNO)
- return nullptr;
+ return nullptr;
}
if (coefficient == 0) {
CBC_ReedSolomonGF256Poly* temp = m_zero->Clone(e);
@@ -108,8 +107,7 @@ int32_t CBC_ReedSolomonGF256::Exp(int32_t a) {
int32_t CBC_ReedSolomonGF256::Log(int32_t a, int32_t& e) {
if (a == 0) {
e = BCExceptionAIsZero;
- if (e != BCExceptionNO)
- return 0;
+ return 0;
}
return m_logTable[a];
}
@@ -117,8 +115,7 @@ int32_t CBC_ReedSolomonGF256::Log(int32_t a, int32_t& e) {
int32_t CBC_ReedSolomonGF256::Inverse(int32_t a, int32_t& e) {
if (a == 0) {
e = BCExceptionAIsZero;
- if (e != BCExceptionNO)
- return 0;
+ return 0;
}
return m_expTable[255 - m_logTable[a]];
}
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
index e37d62e112..a0bbc025c4 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
@@ -42,8 +42,7 @@ void CBC_ReedSolomonGF256Poly::Init(CBC_ReedSolomonGF256* field,
int32_t& e) {
if (!coefficients || coefficients->GetSize() == 0) {
e = BCExceptionCoefficientsSizeIsNull;
- if (e != BCExceptionNO)
- return;
+ return;
}
m_field = field;
int32_t coefficientsLength = coefficients->GetSize();