summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/common/reedsolomon
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-05 12:34:06 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-05 12:34:06 -0700
commitae51c810a44844ef437393c1768be8f7766586b2 (patch)
tree373bbfa8c8720af43d58a9982beea3ebf10c5d6d /xfa/src/fxbarcode/common/reedsolomon
parente3166a8c39c8943f6cafb2ffe10bd9564e3eaf16 (diff)
downloadpdfium-ae51c810a44844ef437393c1768be8f7766586b2.tar.xz
Kill off last uses of FX_NEW in XFA.
It would seem that this never merged completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277583002 .
Diffstat (limited to 'xfa/src/fxbarcode/common/reedsolomon')
-rw-r--r--xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp2
-rw-r--r--xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp8
-rw-r--r--xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp10
-rw-r--r--xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp12
4 files changed, 16 insertions, 16 deletions
diff --git a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
index 286906d152..c2ddd0f69f 100644
--- a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
+++ b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.cpp
@@ -28,7 +28,7 @@ CBC_ReedSolomonEncoder::CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256* field) {
m_field = field;
}
void CBC_ReedSolomonEncoder::Init() {
- m_cachedGenerators.Add(FX_NEW CBC_ReedSolomonGF256Poly(m_field, 1));
+ m_cachedGenerators.Add(new CBC_ReedSolomonGF256Poly(m_field, 1));
}
CBC_ReedSolomonGF256Poly* CBC_ReedSolomonEncoder::BuildGenerator(int32_t degree,
int32_t& e) {
diff --git a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
index d57efe1408..b072309a86 100644
--- a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
+++ b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
@@ -178,7 +178,7 @@ CFX_PtrArray* CBC_ReedSolomonDecoder::RunEuclideanAlgorithm(
CBC_ReedSolomonGF256Poly* rsg14 = r->Multiply(inverse, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
CBC_AutoPtr<CBC_ReedSolomonGF256Poly> omega(rsg14);
- CFX_PtrArray* temp = FX_NEW CFX_PtrArray;
+ CFX_PtrArray* temp = new CFX_PtrArray;
temp->Add(sigma.release());
temp->Add(omega.release());
return temp;
@@ -188,11 +188,11 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorLocations(
int32_t& e) {
int32_t numErrors = errorLocator->GetDegree();
if (numErrors == 1) {
- CBC_AutoPtr<CFX_Int32Array> temp(FX_NEW CFX_Int32Array);
+ CBC_AutoPtr<CFX_Int32Array> temp(new CFX_Int32Array);
temp->Add(errorLocator->GetCoefficients(1));
return temp.release();
}
- CFX_Int32Array* tempT = FX_NEW CFX_Int32Array;
+ CFX_Int32Array* tempT = new CFX_Int32Array;
tempT->SetSize(numErrors);
CBC_AutoPtr<CFX_Int32Array> result(tempT);
int32_t ie = 0;
@@ -215,7 +215,7 @@ CFX_Int32Array* CBC_ReedSolomonDecoder::FindErrorMagnitudes(
FX_BOOL dataMatrix,
int32_t& e) {
int32_t s = errorLocations->GetSize();
- CFX_Int32Array* temp = FX_NEW CFX_Int32Array;
+ CFX_Int32Array* temp = new CFX_Int32Array;
temp->SetSize(s);
CBC_AutoPtr<CFX_Int32Array> result(temp);
for (int32_t i = 0; i < s; i++) {
diff --git a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
index 43c8c82a4d..d862e9a931 100644
--- a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
+++ b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
@@ -26,9 +26,9 @@
CBC_ReedSolomonGF256* CBC_ReedSolomonGF256::QRCodeFild = NULL;
CBC_ReedSolomonGF256* CBC_ReedSolomonGF256::DataMatrixField = NULL;
void CBC_ReedSolomonGF256::Initialize() {
- QRCodeFild = FX_NEW CBC_ReedSolomonGF256(0x011D);
+ QRCodeFild = new CBC_ReedSolomonGF256(0x011D);
QRCodeFild->Init();
- DataMatrixField = FX_NEW CBC_ReedSolomonGF256(0x012D);
+ DataMatrixField = new CBC_ReedSolomonGF256(0x012D);
DataMatrixField->Init();
}
void CBC_ReedSolomonGF256::Finalize() {
@@ -56,8 +56,8 @@ CBC_ReedSolomonGF256::CBC_ReedSolomonGF256(int32_t primitive) {
m_logTable[0] = 0;
}
void CBC_ReedSolomonGF256::Init() {
- m_zero = FX_NEW CBC_ReedSolomonGF256Poly(this, 0);
- m_one = FX_NEW CBC_ReedSolomonGF256Poly(this, 1);
+ m_zero = new CBC_ReedSolomonGF256Poly(this, 0);
+ m_one = new CBC_ReedSolomonGF256Poly(this, 1);
}
CBC_ReedSolomonGF256::~CBC_ReedSolomonGF256() {
if (m_zero != NULL) {
@@ -91,7 +91,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256::BuildMonomial(
CFX_Int32Array coefficients;
coefficients.SetSize(degree + 1);
coefficients[0] = coefficient;
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(this, &coefficients, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
diff --git a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
index 1ab42eb831..127a20b4f9 100644
--- a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
+++ b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
@@ -93,7 +93,7 @@ int32_t CBC_ReedSolomonGF256Poly::EvaluateAt(int32_t a) {
return result;
}
CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256Poly::Clone(int32_t& e) {
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(m_field, &m_coefficients, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
@@ -130,7 +130,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256Poly::AddOrSubtract(
sumDiff[j] = (CBC_ReedSolomonGF256::AddOrSubtract(
smallerCoefficients[j - lengthDiff], largerCoefficients[j]));
}
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(m_field, &sumDiff, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
@@ -159,7 +159,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256Poly::Multiply(
m_field->Multiply(aCoeff, other->GetCoefficients()->operator[](j)));
}
}
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(m_field, &product, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
@@ -181,7 +181,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256Poly::Multiply(int32_t scalar,
for (int32_t i = 0; i < size; i++) {
product[i] = m_field->Multiply(m_coefficients[i], scalar);
}
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(m_field, &product, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
@@ -205,7 +205,7 @@ CBC_ReedSolomonGF256Poly* CBC_ReedSolomonGF256Poly::MultiplyByMonomial(
for (int32_t i = 0; i < size; i++) {
product[i] = (m_field->Multiply(m_coefficients[i], coefficient));
}
- CBC_ReedSolomonGF256Poly* temp = FX_NEW CBC_ReedSolomonGF256Poly();
+ CBC_ReedSolomonGF256Poly* temp = new CBC_ReedSolomonGF256Poly();
temp->Init(m_field, &product, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return temp;
@@ -250,7 +250,7 @@ CFX_PtrArray* CBC_ReedSolomonGF256Poly::Divide(CBC_ReedSolomonGF256Poly* other,
CBC_AutoPtr<CBC_ReedSolomonGF256Poly> temp1(rsg6);
remainder = temp1;
}
- CFX_PtrArray* tempPtrA = FX_NEW CFX_PtrArray;
+ CFX_PtrArray* tempPtrA = new CFX_PtrArray;
tempPtrA->Add(quotient.release());
tempPtrA->Add(remainder.release());
return tempPtrA;