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

Unified Diff: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp

Issue 2571913002: Avoid the ptr.reset(new XXX()) anti-pattern (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « xfa/fxbarcode/BC_TwoDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OneDimWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.cpp
index c9425dfa1958df4871a1ed1768a47624bc609da2..33b828cc1e1ff08efb1254ca0de9dbd4c4b4d9ee 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() {}
« no previous file with comments | « xfa/fxbarcode/BC_TwoDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OneDimWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698