summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_pushbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_pushbutton.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_pushbutton.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp
index 7310da6761..b57c911486 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.cpp
+++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/formfiller/cffl_pushbutton.h"
+#include <utility>
+
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#include "fpdfsdk/pwl/cpwl_special_button.h"
@@ -15,8 +17,9 @@ CFFL_PushButton::CFFL_PushButton(CPDFSDK_FormFillEnvironment* pApp,
CFFL_PushButton::~CFFL_PushButton() {}
-CPWL_Wnd* CFFL_PushButton::NewPDFWindow(const CPWL_Wnd::CreateParams& cp) {
- auto* pWnd = new CPWL_PushButton();
+std::unique_ptr<CPWL_Wnd> CFFL_PushButton::NewPDFWindow(
+ const CPWL_Wnd::CreateParams& cp) {
+ auto pWnd = pdfium::MakeUnique<CPWL_PushButton>();
pWnd->Create(cp);
- return pWnd;
+ return std::move(pWnd);
}