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

Unified Diff: xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp

Issue 1734823002: Get rid of CBC_AutoPtr and use std::unique_ptr instead. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 10 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
Index: xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
diff --git a/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp b/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
index c0e982cb638a8d89297672901fce4c2a0a67a77e..897d9537fd684aaaea01eaeb29d96ec3ae2a3fbd 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();
}

Powered by Google App Engine
This is Rietveld 408576698