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

Unified Diff: xfa/src/fxbarcode/BC_UtilRSS.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/BC_UtilRSS.cpp
diff --git a/xfa/src/fxbarcode/BC_UtilRSS.cpp b/xfa/src/fxbarcode/BC_UtilRSS.cpp
index 958f1923587866075089671d4fafa0fce668179b..dcc12e2268587ede7def62676d40713b63209631 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++) {

Powered by Google App Engine
This is Rietveld 408576698