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

Unified Diff: fpdfsdk/fxedit/fxet_edit.cpp

Issue 2386273004: Add ptr_util.h from base until std::make_unique<> available (Closed)
Patch Set: 2016 Created 4 years, 2 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
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_page.cpp ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index ef3f7415bd1a1ec0b04db3312f30e844a5880875..9f733acd703d2fdf0104ea0142a5a9f827dae1f6 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -28,6 +28,7 @@
#include "fpdfsdk/fxedit/fx_edit.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/pdfwindow/PWL_EditCtrl.h"
+#include "third_party/base/ptr_util.h"
namespace {
@@ -1026,7 +1027,7 @@ void CFX_Edit::Initialize() {
}
void CFX_Edit::SetFontMap(IPVT_FontMap* pFontMap) {
- m_pVTProvider = WrapUnique(new CFX_Edit_Provider(pFontMap));
+ m_pVTProvider = pdfium::MakeUnique<CFX_Edit_Provider>(pFontMap);
m_pVT->SetProvider(m_pVTProvider.get());
}
@@ -1039,8 +1040,10 @@ void CFX_Edit::SetOprNotify(CPWL_Edit* pOprNotify) {
}
CFX_Edit_Iterator* CFX_Edit::GetIterator() {
- if (!m_pIterator)
- m_pIterator = WrapUnique(new CFX_Edit_Iterator(this, m_pVT->GetIterator()));
+ if (!m_pIterator) {
+ m_pIterator =
+ pdfium::MakeUnique<CFX_Edit_Iterator>(this, m_pVT->GetIterator());
+ }
return m_pIterator.get();
}
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_page.cpp ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698