From 2e6864282e65c55ff6809f5aaae011b31c3a361a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 24 Feb 2016 18:20:51 -0800 Subject: Get rid of CBC_AutoPtr and use std::unique_ptr instead. Also fix IWYU in various fxbarcode headers. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1734823002 . --- xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp') diff --git a/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp b/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp index 7b9fe7b4f3..87f0fd072e 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp @@ -20,9 +20,12 @@ * limitations under the License. */ +#include "xfa/src/fxbarcode/qrcode/BC_QRGridSampler.h" + +#include + #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.h" -#include "xfa/src/fxbarcode/qrcode/BC_QRGridSampler.h" #include "xfa/src/fxbarcode/utils.h" CBC_QRGridSampler CBC_QRGridSampler::m_gridSampler; @@ -107,13 +110,12 @@ CBC_CommonBitMatrix* CBC_QRGridSampler::SampleGrid(CBC_CommonBitMatrix* image, FX_FLOAT p4FromX, FX_FLOAT p4FromY, int32_t& e) { - CBC_AutoPtr transform( + std::unique_ptr transform( CBC_CommonPerspectiveTransform::QuadrilateralToQuadrilateral( p1ToX, p1ToY, p2ToX, p2ToY, p3ToX, p3ToY, p4ToX, p4ToY, p1FromX, p1FromY, p2FromX, p2FromY, p3FromX, p3FromY, p4FromX, p4FromY)); - CBC_CommonBitMatrix* tempBitM = new CBC_CommonBitMatrix(); - tempBitM->Init(dimensionX, dimensionY); - CBC_AutoPtr bits(tempBitM); + std::unique_ptr bits(new CBC_CommonBitMatrix()); + bits->Init(dimensionX, dimensionY); CFX_FloatArray points; points.SetSize(dimensionX << 1); for (int32_t y = 0; y < dimensionY; y++) { -- cgit v1.2.3