diff options
author | Lei Zhang <thestig@chromium.org> | 2016-02-24 18:20:51 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-02-24 18:20:51 -0800 |
commit | 2e6864282e65c55ff6809f5aaae011b31c3a361a (patch) | |
tree | 98daecaf078529986a4efc2c43a3f43c0dcc01dd /xfa/src/fxbarcode/BC_UtilRSS.cpp | |
parent | 969ea09df096b987662b9658e3ffa023ca4ebf70 (diff) | |
download | pdfium-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/BC_UtilRSS.cpp')
-rw-r--r-- | xfa/src/fxbarcode/BC_UtilRSS.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <memory> + #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<CFX_Int32Array> widths(iTemp); + std::unique_ptr<CFX_Int32Array> widths(new CFX_Int32Array); + widths->SetSize(elements); int32_t bar; int32_t narrowMask = 0; for (bar = 0; bar < elements - 1; bar++) { |