summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-20 22:06:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-20 22:06:59 +0000
commit96a302c19be8e872df035f5c9e6f83ac76414dbb (patch)
tree1b4523942c95cfb72523ce44da04b6c0407c3538 /xfa/fxfa/fm2js
parente76345ec2780ec13cc99b910ff78e0e3a1f87aec (diff)
downloadpdfium-96a302c19be8e872df035f5c9e6f83ac76414dbb.tar.xz
[formcalc] Remove unused expression type
The expression type is no longer used, removed. Change-Id: I4c8b17ed1644560afd7fc87a7fb6c7d893b9de5c Reviewed-on: https://pdfium-review.googlesource.com/27450 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js')
-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 {