summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-03 15:24:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 15:24:27 -0700
commit36eb4bdcae719cf33c536ff72ac000482aed8382 (patch)
treeb3c3467fa10eafc3863a619ef511d1bf20af6367 /fpdfsdk/fxedit/fxet_edit.cpp
parent76383db4906c9357292846ace77566b34eb47de9 (diff)
downloadpdfium-36eb4bdcae719cf33c536ff72ac000482aed8382.tar.xz
Add ptr_util.h from base until std::make_unique<> available
Review-Url: https://codereview.chromium.org/2386273004
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index ef3f7415bd..9f733acd70 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();
}