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/formfiller/cffl_listbox.cpp | 3 ++- fpdfsdk/formfiller/cffl_textfield.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/formfiller') diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp index 664c02dc36..ab437d401e 100644 --- a/fpdfsdk/formfiller/cffl_listbox.cpp +++ b/fpdfsdk/formfiller/cffl_listbox.cpp @@ -13,6 +13,7 @@ #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" #include "fpdfsdk/fsdk_common.h" #include "fpdfsdk/pdfwindow/PWL_ListBox.h" +#include "third_party/base/ptr_util.h" #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f @@ -37,7 +38,7 @@ PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() { if (!m_pFontMap) { m_pFontMap = - WrapUnique(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler())); + pdfium::MakeUnique(m_pWidget, m_pEnv->GetSysHandler()); } cp.pFontMap = m_pFontMap.get(); diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 7e2cce1d99..ffb3785c36 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -10,6 +10,7 @@ #include "fpdfsdk/cpdfsdk_widget.h" #include "fpdfsdk/formfiller/cba_fontmap.h" #include "fpdfsdk/fsdk_common.h" +#include "third_party/base/ptr_util.h" CFFL_TextField::CFFL_TextField(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot) : CFFL_FormFiller(pApp, pAnnot) {} @@ -72,7 +73,7 @@ PWL_CREATEPARAM CFFL_TextField::GetCreateParam() { if (!m_pFontMap) { m_pFontMap = - WrapUnique(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler())); + pdfium::MakeUnique(m_pWidget, m_pEnv->GetSysHandler()); } cp.pFontMap = m_pFontMap.get(); cp.pFocusHandler = this; -- cgit v1.2.3