Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Unified Diff: fpdfsdk/fxedit/fxet_edit.cpp

Issue 2381723002: Replace std::unique_ptr.reset() with WrapUnique assignment. (Closed)
Patch Set: build Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_page.cpp ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 528a0ba061ee872e99c2cf49a81de0322970cbfa..ce16a21a17aa63c586d03d778023c27e9069a42e 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();
}
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_page.cpp ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698