From 36eb4bdcae719cf33c536ff72ac000482aed8382 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 3 Oct 2016 15:24:27 -0700 Subject: Add ptr_util.h from base until std::make_unique<> available Review-Url: https://codereview.chromium.org/2386273004 --- fpdfsdk/fxedit/fxet_edit.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/fxedit') 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(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(this, m_pVT->GetIterator()); + } return m_pIterator.get(); } -- cgit v1.2.3