summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-09-28 17:04:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-28 17:04:51 -0700
commitd4c34f208aa3b76c5941395823c6dcf6bb7e2f34 (patch)
treeb0d73710639ddfe2fff5578e7cd6b761cd4052ed /fpdfsdk/formfiller
parent5ef75ba52b1ce6024d6aa43b03e25824a04b469b (diff)
downloadpdfium-d4c34f208aa3b76c5941395823c6dcf6bb7e2f34.tar.xz
Replace std::unique_ptr.reset() with WrapUnique assignment.
fpdfsdk/ edition. Review-Url: https://codereview.chromium.org/2381723002
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 7a6976e440..50d04a869a 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -35,8 +35,10 @@ PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() {
if (cp.dwFlags & PWS_AUTOFONTSIZE)
cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE;
- if (!m_pFontMap)
- m_pFontMap.reset(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
+ if (!m_pFontMap) {
+ m_pFontMap =
+ WrapUnique(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
+ }
cp.pFontMap = m_pFontMap.get();
return cp;
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 611da7438a..242179e6f9 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -70,8 +70,10 @@ PWL_CREATEPARAM CFFL_TextField::GetCreateParam() {
break;
}
- if (!m_pFontMap)
- m_pFontMap.reset(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
+ if (!m_pFontMap) {
+ m_pFontMap =
+ WrapUnique(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
+ }
cp.pFontMap = m_pFontMap.get();
cp.pFocusHandler = this;