summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_expression.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-11-29 10:32:35 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-29 10:32:35 -0800
commitf11380fc01cc17f05a34859d34c42b495c8ef8be (patch)
treefdb1c9937469cccef22e199c41110245ee02a480 /xfa/fxfa/fm2js/xfa_expression.h
parent708ef623c2e989a9ad909bf0c94a7dff89694412 (diff)
downloadpdfium-f11380fc01cc17f05a34859d34c42b495c8ef8be.tar.xz
Use unique_ptr in CFXA_FM expressions constructorschromium/2937
Review-Url: https://codereview.chromium.org/2534143003
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_expression.h')
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/xfa/fxfa/fm2js/xfa_expression.h b/xfa/fxfa/fm2js/xfa_expression.h
index f89a923565..a19df268b8 100644
--- a/xfa/fxfa/fm2js/xfa_expression.h
+++ b/xfa/fxfa/fm2js/xfa_expression.h
@@ -63,7 +63,7 @@ class CXFA_FMVarExpression : public CXFA_FMExpression {
public:
CXFA_FMVarExpression(uint32_t line,
const CFX_WideStringC& wsName,
- CXFA_FMExpression* pInit);
+ std::unique_ptr<CXFA_FMExpression> pInit);
~CXFA_FMVarExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -76,7 +76,8 @@ class CXFA_FMVarExpression : public CXFA_FMExpression {
class CXFA_FMExpExpression : public CXFA_FMExpression {
public:
- CXFA_FMExpExpression(uint32_t line, CXFA_FMSimpleExpression* pExpression);
+ CXFA_FMExpExpression(uint32_t line,
+ std::unique_ptr<CXFA_FMSimpleExpression> pExpression);
~CXFA_FMExpExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -102,7 +103,7 @@ class CXFA_FMBlockExpression : public CXFA_FMExpression {
class CXFA_FMDoExpression : public CXFA_FMExpression {
public:
- CXFA_FMDoExpression(uint32_t line, CXFA_FMExpression* pList);
+ CXFA_FMDoExpression(uint32_t line, std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMDoExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -115,9 +116,9 @@ class CXFA_FMDoExpression : public CXFA_FMExpression {
class CXFA_FMIfExpression : public CXFA_FMExpression {
public:
CXFA_FMIfExpression(uint32_t line,
- CXFA_FMSimpleExpression* pExpression,
- CXFA_FMExpression* pIfExpression,
- CXFA_FMExpression* pElseExpression);
+ std::unique_ptr<CXFA_FMSimpleExpression> pExpression,
+ std::unique_ptr<CXFA_FMExpression> pIfExpression,
+ std::unique_ptr<CXFA_FMExpression> pElseExpression);
~CXFA_FMIfExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -140,8 +141,8 @@ class CXFA_FMLoopExpression : public CXFA_FMExpression {
class CXFA_FMWhileExpression : public CXFA_FMLoopExpression {
public:
CXFA_FMWhileExpression(uint32_t line,
- CXFA_FMSimpleExpression* pCodition,
- CXFA_FMExpression* pExpression);
+ std::unique_ptr<CXFA_FMSimpleExpression> pCodition,
+ std::unique_ptr<CXFA_FMExpression> pExpression);
~CXFA_FMWhileExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -172,11 +173,11 @@ class CXFA_FMForExpression : public CXFA_FMLoopExpression {
public:
CXFA_FMForExpression(uint32_t line,
const CFX_WideStringC& wsVariant,
- CXFA_FMSimpleExpression* pAssignment,
- CXFA_FMSimpleExpression* pAccessor,
+ std::unique_ptr<CXFA_FMSimpleExpression> pAssignment,
+ std::unique_ptr<CXFA_FMSimpleExpression> pAccessor,
int32_t iDirection,
- CXFA_FMSimpleExpression* pStep,
- CXFA_FMExpression* pList);
+ std::unique_ptr<CXFA_FMSimpleExpression> pStep,
+ std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMForExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;
@@ -198,7 +199,7 @@ class CXFA_FMForeachExpression : public CXFA_FMLoopExpression {
uint32_t line,
const CFX_WideStringC& wsIdentifier,
std::vector<std::unique_ptr<CXFA_FMSimpleExpression>>&& pAccessors,
- CXFA_FMExpression* pList);
+ std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMForeachExpression() override;
void ToJavaScript(CFX_WideTextBuf& javascript) override;