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

Unified Diff: fpdfsdk/formfiller/cffl_textfield.h

Issue 2173253002: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 4 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/formfiller/cffl_listbox.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_textfield.h
diff --git a/fpdfsdk/formfiller/cffl_textfield.h b/fpdfsdk/formfiller/cffl_textfield.h
index 34968e8fc3f1697dfaf7a2377e2fdd46ecec9397..5f9fc5d3bcf6effbcf4b1f550fe12e556f0fad77 100644
--- a/fpdfsdk/formfiller/cffl_textfield.h
+++ b/fpdfsdk/formfiller/cffl_textfield.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_FORMFILLER_CFFL_TEXTFIELD_H_
#define FPDFSDK_FORMFILLER_CFFL_TEXTFIELD_H_
+#include <memory>
+
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#define BF_ALIGN_LEFT 0
@@ -16,6 +18,8 @@
class CBA_FontMap;
struct FFL_TextFieldState {
+ FFL_TextFieldState() : nStart(0), nEnd(0) {}
+
int nStart;
int nEnd;
CFX_WideString sValue;
@@ -56,7 +60,7 @@ class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler {
#endif // PDF_ENABLE_XFA
private:
- CBA_FontMap* m_pFontMap;
+ std::unique_ptr<CBA_FontMap> m_pFontMap;
FFL_TextFieldState m_State;
};
« no previous file with comments | « fpdfsdk/formfiller/cffl_listbox.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698