summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-24 18:20:51 -0800
committerLei Zhang <thestig@chromium.org>2016-02-24 18:20:51 -0800
commit2e6864282e65c55ff6809f5aaae011b31c3a361a (patch)
tree98daecaf078529986a4efc2c43a3f43c0dcc01dd /xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
parent969ea09df096b987662b9658e3ffa023ca4ebf70 (diff)
downloadpdfium-2e6864282e65c55ff6809f5aaae011b31c3a361a.tar.xz
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 .
Diffstat (limited to 'xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp')
-rw-r--r--xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp b/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
index c0e982cb63..897d9537fd 100644
--- a/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
+++ b/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
@@ -20,8 +20,11 @@
* limitations under the License.
*/
-#include "core/include/fxcrt/fx_basic.h"
#include "xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.h"
+
+#include <memory>
+
+#include "core/include/fxcrt/fx_basic.h"
#include "xfa/src/fxbarcode/utils.h"
CBC_CommonPerspectiveTransform::CBC_CommonPerspectiveTransform(FX_FLOAT a11,
@@ -61,9 +64,9 @@ CBC_CommonPerspectiveTransform::QuadrilateralToQuadrilateral(FX_FLOAT x0,
FX_FLOAT y2p,
FX_FLOAT x3p,
FX_FLOAT y3p) {
- CBC_AutoPtr<CBC_CommonPerspectiveTransform> qToS(
+ std::unique_ptr<CBC_CommonPerspectiveTransform> qToS(
QuadrilateralToSquare(x0, y0, x1, y1, x2, y2, x3, y3));
- CBC_AutoPtr<CBC_CommonPerspectiveTransform> sToQ(
+ std::unique_ptr<CBC_CommonPerspectiveTransform> sToQ(
SquareToQuadrilateral(x0p, y0p, x1p, y1p, x2p, y2p, x3p, y3p));
return sToQ->Times(*(qToS.get()));
}
@@ -123,7 +126,7 @@ CBC_CommonPerspectiveTransform::QuadrilateralToSquare(FX_FLOAT x0,
FX_FLOAT y2,
FX_FLOAT x3,
FX_FLOAT y3) {
- CBC_AutoPtr<CBC_CommonPerspectiveTransform> temp1(
+ std::unique_ptr<CBC_CommonPerspectiveTransform> temp1(
SquareToQuadrilateral(x0, y0, x1, y1, x2, y2, x3, y3));
return temp1->BuildAdjoint();
}