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

Unified Diff: xfa/fxfa/fm2js/xfa_expression.h

Issue 2530933002: Use unique pointers in CXFA_FMParse (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 | « no previous file | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_expression.h
diff --git a/xfa/fxfa/fm2js/xfa_expression.h b/xfa/fxfa/fm2js/xfa_expression.h
index 236b51a6b00d9b80907f395f8c6222d52f85a560..f89a9235653272032bd080b4adaee16ef8e27afa 100644
--- a/xfa/fxfa/fm2js/xfa_expression.h
+++ b/xfa/fxfa/fm2js/xfa_expression.h
@@ -46,7 +46,7 @@ class CXFA_FMFunctionDefinition : public CXFA_FMExpression {
bool isGlobal,
const CFX_WideStringC& wsName,
std::unique_ptr<CFX_WideStringCArray> pArguments,
- CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressions);
+ std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressions);
~CXFA_FMFunctionDefinition() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -55,7 +55,7 @@ class CXFA_FMFunctionDefinition : public CXFA_FMExpression {
private:
CFX_WideStringC m_wsName;
std::unique_ptr<CFX_WideStringCArray> m_pArguments;
- CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressions;
+ std::vector<std::unique_ptr<CXFA_FMExpression>> m_pExpressions;
bool m_isGlobal;
};
@@ -88,17 +88,16 @@ class CXFA_FMExpExpression : public CXFA_FMExpression {
class CXFA_FMBlockExpression : public CXFA_FMExpression {
public:
- // Takes ownership of |pExpressionList|.
CXFA_FMBlockExpression(
uint32_t line,
- CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressionList);
+ std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressionList);
~CXFA_FMBlockExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
void ToImpliedReturnJS(CFX_WideTextBuf&) override;
private:
- CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressionList;
+ std::vector<std::unique_ptr<CXFA_FMExpression>> m_ExpressionList;
};
class CXFA_FMDoExpression : public CXFA_FMExpression {
« no previous file with comments | « no previous file | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698