diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-30 16:12:02 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-30 20:26:02 +0000 |
commit | 0bb1333a9eff1190ddd68f34c71d6a779c69dfef (patch) | |
tree | 5a46946c4852f147309e2b1389e6f42d6553abf7 /fpdfsdk/cpdfsdk_interform.cpp | |
parent | 908c848202ef137e98d96f82a4eadfae551403b7 (diff) | |
download | pdfium-0bb1333a9eff1190ddd68f34c71d6a779c69dfef.tar.xz |
Add some calls to MakeUnique
This CL replaces some new's with pdfium::MakeUnique.
Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb
Reviewed-on: https://pdfium-review.googlesource.com/3430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index a16ec93c7a..635a534297 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -47,7 +47,8 @@ CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_FormFillEnvironment* pFormFillEnv) : m_pFormFillEnv(pFormFillEnv), - m_pInterForm(new CPDF_InterForm(m_pFormFillEnv->GetPDFDocument())), + m_pInterForm( + pdfium::MakeUnique<CPDF_InterForm>(m_pFormFillEnv->GetPDFDocument())), #ifdef PDF_ENABLE_XFA m_bXfaCalculate(true), m_bXfaValidationsEnabled(true), @@ -73,8 +74,8 @@ bool CPDFSDK_InterForm::HighlightWidgets() { CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const { - std::unique_ptr<CBA_AnnotIterator> pIterator(new CBA_AnnotIterator( - pWidget->GetPageView(), CPDF_Annot::Subtype::WIDGET)); + auto pIterator = pdfium::MakeUnique<CBA_AnnotIterator>( + pWidget->GetPageView(), CPDF_Annot::Subtype::WIDGET); if (bNext) return static_cast<CPDFSDK_Widget*>(pIterator->GetNextAnnot(pWidget)); |