summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/common
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-14 05:57:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-14 05:57:10 -0800
commita9caab94c1f16929e5acf2676117224617d80f53 (patch)
treed71ff9a82fae6e6080deb76375f43056127b3ee2 /xfa/fxbarcode/common
parent992ecf7c189e5cabf43e5ad862511cf63d030966 (diff)
downloadpdfium-a9caab94c1f16929e5acf2676117224617d80f53.tar.xz
Avoid the ptr.reset(new XXX()) anti-pattern
Be suspicious of |new|. This removes some of the easy cases. Review-Url: https://codereview.chromium.org/2571913002
Diffstat (limited to 'xfa/fxbarcode/common')
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
index c9425dfa19..33b828cc1e 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
@@ -21,6 +21,8 @@
*/
#include "xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h"
+
+#include "third_party/base/ptr_util.h"
#include "xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h"
CBC_ReedSolomonGF256* CBC_ReedSolomonGF256::QRCodeField = nullptr;
@@ -56,8 +58,8 @@ CBC_ReedSolomonGF256::CBC_ReedSolomonGF256(int32_t primitive) {
}
void CBC_ReedSolomonGF256::Init() {
- m_zero.reset(new CBC_ReedSolomonGF256Poly(this, 0));
- m_one.reset(new CBC_ReedSolomonGF256Poly(this, 1));
+ m_zero = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>(this, 0);
+ m_one = pdfium::MakeUnique<CBC_ReedSolomonGF256Poly>(this, 1);
}
CBC_ReedSolomonGF256::~CBC_ReedSolomonGF256() {}