diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-25 12:03:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-25 19:16:31 +0000 |
commit | 797ca5cad52edde7c65da45a15216f20b1bfd8fd (patch) | |
tree | 811a96d5f505e7cff89395cea7dff89604fc9133 /fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp | |
parent | 3a4c408554f2f2ffb5a143f6dadcdd528fcf106e (diff) | |
download | pdfium-797ca5cad52edde7c65da45a15216f20b1bfd8fd.tar.xz |
Mass conversion of all const-lifetime class members
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp')
-rw-r--r-- | fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp b/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp index ca65f72043..2be74c7fa3 100644 --- a/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp +++ b/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp @@ -36,7 +36,7 @@ CBC_ReedSolomonEncoder::~CBC_ReedSolomonEncoder() {} void CBC_ReedSolomonEncoder::Init() { m_cachedGenerators.push_back( - pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>(m_field, 1)); + pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>(m_field.Get(), 1)); } CBC_ReedSolomonGF256Poly* CBC_ReedSolomonEncoder::BuildGenerator( @@ -46,7 +46,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonEncoder::BuildGenerator( for (size_t d = m_cachedGenerators.size(); d <= degree; ++d) { std::vector<int32_t> temp = {1, m_field->Exp(d - 1)}; CBC_ReedSolomonGF256Poly temp_poly; - if (!temp_poly.Init(m_field, &temp)) + if (!temp_poly.Init(m_field.Get(), &temp)) return nullptr; auto nextGenerator = lastGenerator->Multiply(&temp_poly); @@ -78,7 +78,7 @@ bool CBC_ReedSolomonEncoder::Encode(std::vector<int32_t>* toEncode, infoCoefficients[x] = (*toEncode)[x]; CBC_ReedSolomonGF256Poly info; - if (!info.Init(m_field, &infoCoefficients)) + if (!info.Init(m_field.Get(), &infoCoefficients)) return false; auto infoTemp = info.MultiplyByMonomial(ecBytes, 1); |