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/BC_UtilRSS.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xfa/src/fxbarcode/BC_UtilRSS.cpp') diff --git a/xfa/src/fxbarcode/BC_UtilRSS.cpp b/xfa/src/fxbarcode/BC_UtilRSS.cpp index 958f192358..dcc12e2268 100644 --- a/xfa/src/fxbarcode/BC_UtilRSS.cpp +++ b/xfa/src/fxbarcode/BC_UtilRSS.cpp @@ -22,6 +22,8 @@ #include "xfa/src/fxbarcode/BC_UtilRSS.h" +#include + #include "core/include/fxcrt/fx_basic.h" #include "xfa/src/fxbarcode/utils.h" @@ -32,9 +34,8 @@ CFX_Int32Array* CBC_UtilRSS::GetRssWidths(int32_t val, int32_t elements, int32_t maxWidth, FX_BOOL noNarrow) { - CFX_Int32Array* iTemp = new CFX_Int32Array; - iTemp->SetSize(elements); - CBC_AutoPtr widths(iTemp); + std::unique_ptr widths(new CFX_Int32Array); + widths->SetSize(elements); int32_t bar; int32_t narrowMask = 0; for (bar = 0; bar < elements - 1; bar++) { -- cgit v1.2.3