Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp

Issue 1941863002: Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 11 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417Reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
index 2c96f7005fb2ca6286f3c0e77b52ba6069be8e28..6a1f46fd0224e7ea09d2b0fa5c69107d9b283aa4 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
@@ -65,7 +65,7 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received,
delete syndrome;
return -1;
}
- CFX_PtrArray* sigmaOmega =
+ CFX_ArrayTemplate<CBC_PDF417ECModulusPoly*>* sigmaOmega =
runEuclideanAlgorithm(buildmonomial, syndrome, numECCodewords, e);
delete buildmonomial;
delete syndrome;
@@ -123,11 +123,11 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received,
delete sigmaOmega;
return result;
}
-CFX_PtrArray* CBC_PDF417ECErrorCorrection::runEuclideanAlgorithm(
- CBC_PDF417ECModulusPoly* a,
- CBC_PDF417ECModulusPoly* b,
- int32_t R,
- int32_t& e) {
+CFX_ArrayTemplate<CBC_PDF417ECModulusPoly*>*
+CBC_PDF417ECErrorCorrection::runEuclideanAlgorithm(CBC_PDF417ECModulusPoly* a,
+ CBC_PDF417ECModulusPoly* b,
+ int32_t R,
+ int32_t& e) {
if (a->getDegree() < b->getDegree()) {
CBC_PDF417ECModulusPoly* temp = a;
a = b;
@@ -262,7 +262,8 @@ CFX_PtrArray* CBC_PDF417ECErrorCorrection::runEuclideanAlgorithm(
CBC_PDF417ECModulusPoly* omega = r->multiply(inverse, e);
delete rtemp;
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- CFX_PtrArray* modulusPoly = new CFX_PtrArray;
+ CFX_ArrayTemplate<CBC_PDF417ECModulusPoly*>* modulusPoly =
+ new CFX_ArrayTemplate<CBC_PDF417ECModulusPoly*>();
modulusPoly->Add(sigma);
modulusPoly->Add(omega);
return modulusPoly;
« no previous file with comments | « xfa/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417Reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698