summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_simpleexpression.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-11-28 12:31:13 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-28 12:31:13 -0800
commiteb9625c04876c45862fb30e48a4fd6d5998db0e9 (patch)
tree67725226cdf317ff35213da6761dfc0455ec69fb /xfa/fxfa/fm2js/xfa_simpleexpression.h
parentc92e26defaa636b0d2ec9b9de0f88c6153ad7ed3 (diff)
downloadpdfium-eb9625c04876c45862fb30e48a4fd6d5998db0e9.tar.xz
Use unique pointers in CXFA_FMParse
Replaced CXFA_FMParse's returns to be unique pointers to prevent leaks. Review-Url: https://codereview.chromium.org/2530933002
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_simpleexpression.h')
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.h b/xfa/fxfa/fm2js/xfa_simpleexpression.h
index 6c1e6257bd..c96d990b08 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.h
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.h
@@ -8,6 +8,7 @@
#define XFA_FXFA_FM2JS_XFA_SIMPLEEXPRESSION_H_
#include <memory>
+#include <vector>
#include "core/fxcrt/fx_basic.h"
#include "xfa/fxfa/fm2js/xfa_lexer.h"
@@ -228,10 +229,11 @@ class CXFA_FMNotExpression : public CXFA_FMUnaryExpression {
class CXFA_FMCallExpression : public CXFA_FMUnaryExpression {
public:
- CXFA_FMCallExpression(uint32_t line,
- CXFA_FMSimpleExpression* pExp,
- CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* pArguments,
- bool bIsSomMethod);
+ CXFA_FMCallExpression(
+ uint32_t line,
+ CXFA_FMSimpleExpression* pExp,
+ std::vector<std::unique_ptr<CXFA_FMSimpleExpression>>&& pArguments,
+ bool bIsSomMethod);
~CXFA_FMCallExpression() override;
bool IsBuildInFunc(CFX_WideTextBuf* funcName);
@@ -240,7 +242,7 @@ class CXFA_FMCallExpression : public CXFA_FMUnaryExpression {
private:
bool m_bIsSomMethod;
- CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* m_pArguments;
+ std::vector<std::unique_ptr<CXFA_FMSimpleExpression>> m_Arguments;
};
class CXFA_FMDotAccessorExpression : public CXFA_FMBinExpression {