summaryrefslogtreecommitdiff
path: root/fxbarcode/common/reedsolomon
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/common/reedsolomon')
-rw-r--r--fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp10
-rw-r--r--fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp b/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
index 5c26188f53..ef83691d4f 100644
--- a/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
+++ b/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
@@ -106,7 +106,7 @@ int32_t CBC_ReedSolomonGF256Poly::EvaluateAt(int32_t a) {
std::unique_ptr<CBC_ReedSolomonGF256Poly> CBC_ReedSolomonGF256Poly::Clone()
const {
auto temp = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>();
- if (!temp->Init(m_field, &m_coefficients))
+ if (!temp->Init(m_field.Get(), &m_coefficients))
return nullptr;
return temp;
}
@@ -133,7 +133,7 @@ CBC_ReedSolomonGF256Poly::AddOrSubtract(const CBC_ReedSolomonGF256Poly* other) {
smallerCoefficients[j - lengthDiff], largerCoefficients[j]);
}
auto temp = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>();
- if (!temp->Init(m_field, &sumDiff))
+ if (!temp->Init(m_field.Get(), &sumDiff))
return nullptr;
return temp;
}
@@ -156,7 +156,7 @@ std::unique_ptr<CBC_ReedSolomonGF256Poly> CBC_ReedSolomonGF256Poly::Multiply(
}
}
auto temp = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>();
- if (!temp->Init(m_field, &product))
+ if (!temp->Init(m_field.Get(), &product))
return nullptr;
return temp;
}
@@ -174,7 +174,7 @@ std::unique_ptr<CBC_ReedSolomonGF256Poly> CBC_ReedSolomonGF256Poly::Multiply(
product[i] = m_field->Multiply(m_coefficients[i], scalar);
auto temp = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>();
- if (!temp->Init(m_field, &product))
+ if (!temp->Init(m_field.Get(), &product))
return nullptr;
return temp;
}
@@ -193,7 +193,7 @@ CBC_ReedSolomonGF256Poly::MultiplyByMonomial(int32_t degree,
product[i] = m_field->Multiply(m_coefficients[i], coefficient);
auto temp = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>();
- if (!temp->Init(m_field, &product))
+ if (!temp->Init(m_field.Get(), &product))
return nullptr;
return temp;
}
diff --git a/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h b/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
index ce8a572704..f7aea2bf53 100644
--- a/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
+++ b/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
@@ -40,7 +40,7 @@ class CBC_ReedSolomonGF256Poly final {
std::unique_ptr<CBC_ReedSolomonGF256Poly> Clone() const;
private:
- CBC_ReedSolomonGF256* m_field;
+ CFX_UnownedPtr<CBC_ReedSolomonGF256> m_field;
std::vector<int32_t> m_coefficients;
};