summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
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/fxedit
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/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 528a0ba061..ce16a21a17 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -7,6 +7,8 @@
#include "fpdfsdk/fxedit/include/fxet_edit.h"
#include <algorithm>
+#include <memory>
+#include <utility>
#include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
#include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h"
@@ -24,7 +26,6 @@
#include "core/fxge/include/cfx_renderdevice.h"
#include "fpdfsdk/cfx_systemhandler.h"
#include "fpdfsdk/fxedit/include/fx_edit.h"
-#include "fpdfsdk/fxedit/include/fxet_edit.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/pdfwindow/PWL_EditCtrl.h"
@@ -1025,7 +1026,7 @@ void CFX_Edit::Initialize() {
}
void CFX_Edit::SetFontMap(IPVT_FontMap* pFontMap) {
- m_pVTProvider.reset(new CFX_Edit_Provider(pFontMap));
+ m_pVTProvider = WrapUnique(new CFX_Edit_Provider(pFontMap));
m_pVT->SetProvider(m_pVTProvider.get());
}
@@ -1039,7 +1040,7 @@ void CFX_Edit::SetOprNotify(CPWL_Edit* pOprNotify) {
CFX_Edit_Iterator* CFX_Edit::GetIterator() {
if (!m_pIterator)
- m_pIterator.reset(new CFX_Edit_Iterator(this, m_pVT->GetIterator()));
+ m_pIterator = WrapUnique(new CFX_Edit_Iterator(this, m_pVT->GetIterator()));
return m_pIterator.get();
}