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

Unified Diff: xfa/fxfa/parser/xfa_locale.h

Issue 2227883002: Use smart pointers for class owned pointers in xfa/fxfa (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 | « xfa/fxfa/parser/cxfa_resolveprocessor.cpp ('k') | xfa/fxfa/parser/xfa_locale.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_locale.h
diff --git a/xfa/fxfa/parser/xfa_locale.h b/xfa/fxfa/parser/xfa_locale.h
index 0c72381cd56b367e015cb65bf1e1f5dcf6939430..0463a9f9e916adbb1936a00e0dc969086a2c77e7 100644
--- a/xfa/fxfa/parser/xfa_locale.h
+++ b/xfa/fxfa/parser/xfa_locale.h
@@ -7,12 +7,14 @@
#ifndef XFA_FXFA_PARSER_XFA_LOCALE_H_
#define XFA_FXFA_PARSER_XFA_LOCALE_H_
+#include <memory>
+
#include "xfa/fgas/localization/fgas_locale.h"
#include "xfa/fxfa/parser/xfa_object.h"
class CXFA_XMLLocale : public IFX_Locale {
public:
- CXFA_XMLLocale(CXML_Element* pLocaleData);
+ explicit CXFA_XMLLocale(std::unique_ptr<CXML_Element> pLocaleData);
// IFX_Locale
void Release() override;
@@ -51,7 +53,7 @@ class CXFA_XMLLocale : public IFX_Locale {
FX_BOOL bAbbr) const;
private:
- CXML_Element* m_pLocaleData;
+ std::unique_ptr<CXML_Element> m_pLocaleData;
};
class CXFA_NodeLocale : public IFX_Locale {
@@ -94,7 +96,7 @@ class CXFA_NodeLocale : public IFX_Locale {
int index,
FX_BOOL bAbbr) const;
- CXFA_Node* m_pLocale;
+ CXFA_Node* const m_pLocale;
};
#endif // XFA_FXFA_PARSER_XFA_LOCALE_H_
« no previous file with comments | « xfa/fxfa/parser/cxfa_resolveprocessor.cpp ('k') | xfa/fxfa/parser/xfa_locale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698