diff options
author | tsepez <tsepez@chromium.org> | 2016-06-10 13:19:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-10 13:19:16 -0700 |
commit | c14c958db677802a52e84a0e772f6185eb89b3fd (patch) | |
tree | 8ae7568163fc0478e678f9e0721f73e29c959bc2 /xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp | |
parent | cfb77ccb1c057d6beb73f0043e42eee8c4822f84 (diff) | |
download | pdfium-c14c958db677802a52e84a0e772f6185eb89b3fd.tar.xz |
Remove redundant casts, part 9.
Make CFDE_TxtEdtParag::m_lpData a int32_t*, not void*, since
it is cast to int32_t everywhere it is used.
Many fxbarcode casts are redundant, likely the result of
previous generic PtrArray replacement with templated type.
Review-Url: https://codereview.chromium.org/2059953002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp index aadb1a6ac5..f7e1546f19 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp @@ -70,14 +70,12 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received, delete buildmonomial; delete syndrome; BC_EXCEPTION_CHECK_ReturnValue(e, -1); - CBC_PDF417ECModulusPoly* sigma = - (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(0); - CBC_PDF417ECModulusPoly* omega = - (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(1); + CBC_PDF417ECModulusPoly* sigma = sigmaOmega->GetAt(0); + CBC_PDF417ECModulusPoly* omega = sigmaOmega->GetAt(1); CFX_Int32Array* errorLocations = findErrorLocations(sigma, e); if (e != BCExceptionNO) { for (int32_t i = 0; i < sigmaOmega->GetSize(); i++) { - delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(i); + delete sigmaOmega->GetAt(i); } sigmaOmega->RemoveAll(); delete sigmaOmega; @@ -88,7 +86,7 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received, if (e != BCExceptionNO) { delete errorLocations; for (int32_t i = 0; i < sigmaOmega->GetSize(); i++) { - delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(i); + delete sigmaOmega->GetAt(i); } sigmaOmega->RemoveAll(); delete sigmaOmega; @@ -104,7 +102,7 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received, delete errorLocations; delete errorMagnitudes; for (int32_t j = 0; j < sigmaOmega->GetSize(); j++) { - delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(j); + delete sigmaOmega->GetAt(j); } sigmaOmega->RemoveAll(); delete sigmaOmega; @@ -117,7 +115,7 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received, delete errorLocations; delete errorMagnitudes; for (int32_t k = 0; k < sigmaOmega->GetSize(); k++) { - delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(k); + delete sigmaOmega->GetAt(k); } sigmaOmega->RemoveAll(); delete sigmaOmega; |