summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_iformfiller.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-03 11:06:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-03 11:06:49 -0700
commit2d5b020304e8a9aa8afeb632c61daa7ece87e36d (patch)
tree4d7f04d4800577fa597b4ca1f1b4d31b87194ef0 /fpdfsdk/formfiller/cffl_iformfiller.h
parentca27127240fbca2184f1c576b15b5212d5b314e6 (diff)
downloadpdfium-2d5b020304e8a9aa8afeb632c61daa7ece87e36d.tar.xz
Use smart pointers for class owned pointers
For all classes under /fpdfsdk, use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2173253002
Diffstat (limited to 'fpdfsdk/formfiller/cffl_iformfiller.h')
-rw-r--r--fpdfsdk/formfiller/cffl_iformfiller.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.h b/fpdfsdk/formfiller/cffl_iformfiller.h
index b01159475a..b5b0e4aed6 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.h
+++ b/fpdfsdk/formfiller/cffl_iformfiller.h
@@ -8,6 +8,7 @@
#define FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_
#include <map>
+#include <memory>
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
@@ -140,7 +141,8 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify {
#endif // PDF_ENABLE_XFA
private:
- using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>;
+ using CFFL_Widget2Filler =
+ std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormFiller>>;
// IPWL_Filler_Notify:
void QueryWherePopup(void* pPrivateData,
@@ -170,7 +172,7 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify {
#endif // PDF_ENABLE_XFA
void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot);
- CPDFDoc_Environment* m_pApp;
+ CPDFDoc_Environment* const m_pApp;
CFFL_Widget2Filler m_Maps;
FX_BOOL m_bNotifying;
};