summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_environment.cpp
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/cpdfsdk_environment.cpp
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/cpdfsdk_environment.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_environment.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_environment.cpp b/fpdfsdk/cpdfsdk_environment.cpp
index b17b782367..0f621eb887 100644
--- a/fpdfsdk/cpdfsdk_environment.cpp
+++ b/fpdfsdk/cpdfsdk_environment.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/include/cpdfsdk_environment.h"
+#include <memory>
+
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/include/cpdfsdk_annothandlermgr.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
@@ -199,19 +201,19 @@ IJS_Runtime* CPDFSDK_Environment::GetJSRuntime() {
CPDFSDK_AnnotHandlerMgr* CPDFSDK_Environment::GetAnnotHandlerMgr() {
if (!m_pAnnotHandlerMgr)
- m_pAnnotHandlerMgr.reset(new CPDFSDK_AnnotHandlerMgr(this));
+ m_pAnnotHandlerMgr = WrapUnique(new CPDFSDK_AnnotHandlerMgr(this));
return m_pAnnotHandlerMgr.get();
}
CPDFSDK_ActionHandler* CPDFSDK_Environment::GetActionHander() {
if (!m_pActionHandler)
- m_pActionHandler.reset(new CPDFSDK_ActionHandler());
+ m_pActionHandler = WrapUnique(new CPDFSDK_ActionHandler());
return m_pActionHandler.get();
}
CFFL_InteractiveFormFiller* CPDFSDK_Environment::GetInteractiveFormFiller() {
if (!m_pFormFiller)
- m_pFormFiller.reset(new CFFL_InteractiveFormFiller(this));
+ m_pFormFiller = WrapUnique(new CFFL_InteractiveFormFiller(this));
return m_pFormFiller.get();
}