summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-30 16:12:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 20:26:02 +0000
commit0bb1333a9eff1190ddd68f34c71d6a779c69dfef (patch)
tree5a46946c4852f147309e2b1389e6f42d6553abf7 /fpdfsdk/cpdfsdk_widget.cpp
parent908c848202ef137e98d96f82a4eadfae551403b7 (diff)
downloadpdfium-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_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 2ffd170d8a..e65a94b2b3 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -1357,7 +1357,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const CFX_WideString* sValue) {
rcButton.left = rcButton.right - 13;
rcButton.Normalize();
- std::unique_ptr<CFX_Edit> pEdit(new CFX_Edit);
+ auto pEdit = pdfium::MakeUnique<CFX_Edit>();
pEdit->EnableRefresh(false);
CBA_FontMap font_map(this, m_pInterForm->GetFormFillEnv()->GetSysHandler());
@@ -1421,7 +1421,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox() {
CFX_FloatRect rcClient = GetClientRect();
CFX_ByteTextBuf sBody, sLines;
- std::unique_ptr<CFX_Edit> pEdit(new CFX_Edit);
+ auto pEdit = pdfium::MakeUnique<CFX_Edit>();
pEdit->EnableRefresh(false);
CBA_FontMap font_map(this, m_pInterForm->GetFormFillEnv()->GetSysHandler());
@@ -1503,7 +1503,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const CFX_WideString* sValue) {
CPDF_FormField* pField = pControl->GetField();
CFX_ByteTextBuf sBody, sLines;
- std::unique_ptr<CFX_Edit> pEdit(new CFX_Edit);
+ auto pEdit = pdfium::MakeUnique<CFX_Edit>();
pEdit->EnableRefresh(false);
CBA_FontMap font_map(this, m_pInterForm->GetFormFillEnv()->GetSysHandler());