diff options
Diffstat (limited to 'fpdfsdk/formfiller/cffl_checkbox.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_checkbox.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp index 4308c1a1a5..ac55125db2 100644 --- a/fpdfsdk/formfiller/cffl_checkbox.cpp +++ b/fpdfsdk/formfiller/cffl_checkbox.cpp @@ -6,11 +6,14 @@ #include "fpdfsdk/formfiller/cffl_checkbox.h" +#include <utility> + #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_widget.h" #include "fpdfsdk/formfiller/cffl_formfiller.h" #include "fpdfsdk/pwl/cpwl_special_button.h" #include "public/fpdf_fwlevent.h" +#include "third_party/base/ptr_util.h" CFFL_CheckBox::CFFL_CheckBox(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Widget* pWidget) @@ -18,11 +21,12 @@ CFFL_CheckBox::CFFL_CheckBox(CPDFSDK_FormFillEnvironment* pApp, CFFL_CheckBox::~CFFL_CheckBox() {} -CPWL_Wnd* CFFL_CheckBox::NewPDFWindow(const CPWL_Wnd::CreateParams& cp) { - auto* pWnd = new CPWL_CheckBox(); +std::unique_ptr<CPWL_Wnd> CFFL_CheckBox::NewPDFWindow( + const CPWL_Wnd::CreateParams& cp) { + auto pWnd = pdfium::MakeUnique<CPWL_CheckBox>(); pWnd->Create(cp); pWnd->SetCheck(m_pWidget->IsChecked()); - return pWnd; + return std::move(pWnd); } bool CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, |