summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_resolveprocessor.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-10 14:50:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-10 14:50:48 -0700
commitb4d1b576bccb5ca6cebe29288af014bd0f512af1 (patch)
tree2d60839a8323eb6780c782aba4ae1123243c7355 /xfa/fxfa/parser/cxfa_resolveprocessor.h
parent1194561d5d83869edecf6a1f402122a59955f0b7 (diff)
downloadpdfium-b4d1b576bccb5ca6cebe29288af014bd0f512af1.tar.xz
Use smart pointers for class owned pointers in xfa/fxfa
Use smart pointers instead of raw pointer to make memory management easier for classes mainly under xfa/fxfa. Also change the return type of IFGAS_FontMgr::Create() to smart pointer type. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2227883002
Diffstat (limited to 'xfa/fxfa/parser/cxfa_resolveprocessor.h')
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.h b/xfa/fxfa/parser/cxfa_resolveprocessor.h
index 4db0ea2270..630a54ea3c 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.h
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_
#define XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_
+#include <memory>
+
#include "xfa/fxfa/parser/xfa_object.h"
#include "xfa/fxfa/parser/xfa_resolvenode_rs.h"
@@ -46,7 +48,7 @@ class CXFA_ResolveProcessor {
int32_t iCount);
void SetCurStart(int32_t start) { m_iCurStart = start; }
- CXFA_NodeHelper* GetNodeHelper() { return m_pNodeHelper; }
+ CXFA_NodeHelper* GetNodeHelper() const { return m_pNodeHelper.get(); }
private:
int32_t ResolveForAttributeRs(CXFA_Object* curNode,
@@ -72,7 +74,7 @@ class CXFA_ResolveProcessor {
void FilterCondition(CXFA_ResolveNodesData& rnd, CFX_WideString wsCondition);
int32_t m_iCurStart;
- CXFA_NodeHelper* m_pNodeHelper;
+ std::unique_ptr<CXFA_NodeHelper> m_pNodeHelper;
};
#endif // XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_