summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmexpression.cpp24
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmexpression.h17
2 files changed, 8 insertions, 33 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
index 481b76c868..30c0639758 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
@@ -21,16 +21,14 @@ const wchar_t kMinusEqual[] = L" -= ";
} // namespace
-CXFA_FMExpression::CXFA_FMExpression() : m_type(XFA_FM_EXPTYPE_UNKNOWN) {}
-
-CXFA_FMExpression::CXFA_FMExpression(XFA_FM_EXPTYPE type) : m_type(type) {}
+CXFA_FMExpression::CXFA_FMExpression() = default;
CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition(
bool isGlobal,
const WideStringView& wsName,
std::vector<WideStringView>&& arguments,
std::vector<std::unique_ptr<CXFA_FMExpression>>&& expressions)
- : CXFA_FMExpression(XFA_FM_EXPTYPE_FUNC),
+ : CXFA_FMExpression(),
m_wsName(wsName),
m_pArguments(std::move(arguments)),
m_pExpressions(std::move(expressions)),
@@ -103,9 +101,7 @@ bool CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& js,
CXFA_FMVarExpression::CXFA_FMVarExpression(
const WideStringView& wsName,
std::unique_ptr<CXFA_FMSimpleExpression> pInit)
- : CXFA_FMExpression(XFA_FM_EXPTYPE_VAR),
- m_wsName(wsName),
- m_pInit(std::move(pInit)) {}
+ : CXFA_FMExpression(), m_wsName(wsName), m_pInit(std::move(pInit)) {}
CXFA_FMVarExpression::~CXFA_FMVarExpression() {}
@@ -136,8 +132,7 @@ bool CXFA_FMVarExpression::ToJavaScript(CFX_WideTextBuf& js, ReturnType type) {
CXFA_FMExpExpression::CXFA_FMExpExpression(
std::unique_ptr<CXFA_FMSimpleExpression> pExpression)
- : CXFA_FMExpression(XFA_FM_EXPTYPE_EXP),
- m_pExpression(std::move(pExpression)) {}
+ : CXFA_FMExpression(), m_pExpression(std::move(pExpression)) {}
CXFA_FMExpExpression::~CXFA_FMExpExpression() {}
@@ -180,8 +175,7 @@ bool CXFA_FMExpExpression::ToJavaScript(CFX_WideTextBuf& js, ReturnType type) {
CXFA_FMBlockExpression::CXFA_FMBlockExpression(
std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressionList)
- : CXFA_FMExpression(XFA_FM_EXPTYPE_BLOCK),
- m_ExpressionList(std::move(pExpressionList)) {}
+ : CXFA_FMExpression(), m_ExpressionList(std::move(pExpressionList)) {}
CXFA_FMBlockExpression::~CXFA_FMBlockExpression() {}
@@ -227,7 +221,7 @@ CXFA_FMIfExpression::CXFA_FMIfExpression(
std::unique_ptr<CXFA_FMSimpleExpression> pExpression,
std::unique_ptr<CXFA_FMExpression> pIfExpression,
std::unique_ptr<CXFA_FMExpression> pElseExpression)
- : CXFA_FMExpression(XFA_FM_EXPTYPE_IF),
+ : CXFA_FMExpression(),
m_pExpression(std::move(pExpression)),
m_pIfExpression(std::move(pIfExpression)),
m_pElseExpression(std::move(pElseExpression)) {}
@@ -303,8 +297,7 @@ bool CXFA_FMWhileExpression::ToJavaScript(CFX_WideTextBuf& js,
return !CXFA_IsTooBig(js);
}
-CXFA_FMBreakExpression::CXFA_FMBreakExpression()
- : CXFA_FMExpression(XFA_FM_EXPTYPE_BREAK) {}
+CXFA_FMBreakExpression::CXFA_FMBreakExpression() : CXFA_FMExpression() {}
CXFA_FMBreakExpression::~CXFA_FMBreakExpression() {}
@@ -318,8 +311,7 @@ bool CXFA_FMBreakExpression::ToJavaScript(CFX_WideTextBuf& js,
return !CXFA_IsTooBig(js);
}
-CXFA_FMContinueExpression::CXFA_FMContinueExpression()
- : CXFA_FMExpression(XFA_FM_EXPTYPE_CONTINUE) {}
+CXFA_FMContinueExpression::CXFA_FMContinueExpression() : CXFA_FMExpression() {}
CXFA_FMContinueExpression::~CXFA_FMContinueExpression() {}
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.h b/xfa/fxfa/fm2js/cxfa_fmexpression.h
index 3b2fb4731d..88f2d6e4ed 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.h
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.h
@@ -12,17 +12,6 @@
#include "xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h"
-enum XFA_FM_EXPTYPE {
- XFA_FM_EXPTYPE_UNKNOWN,
- XFA_FM_EXPTYPE_FUNC,
- XFA_FM_EXPTYPE_VAR,
- XFA_FM_EXPTYPE_EXP,
- XFA_FM_EXPTYPE_BLOCK,
- XFA_FM_EXPTYPE_IF,
- XFA_FM_EXPTYPE_BREAK,
- XFA_FM_EXPTYPE_CONTINUE,
-};
-
class CFX_WideTextBuf;
class CXFA_FMExpression {
@@ -30,14 +19,8 @@ class CXFA_FMExpression {
virtual ~CXFA_FMExpression() {}
virtual bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) = 0;
- XFA_FM_EXPTYPE GetExpType() const { return m_type; }
-
protected:
CXFA_FMExpression();
- explicit CXFA_FMExpression(XFA_FM_EXPTYPE type);
-
- private:
- XFA_FM_EXPTYPE m_type;
};
class CXFA_FMFunctionDefinition : public CXFA_FMExpression {