summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmparser.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmparser.cpp b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
index 09cbee5a10..f000066a19 100644
--- a/xfa/fxfa/fm2js/cxfa_fmparser.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
@@ -131,11 +131,8 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseFunction() {
return nullptr;
std::vector<std::unique_ptr<CXFA_FMExpression>> expressions;
- if (m_token.m_type != TOKendfunc) {
+ if (m_token.m_type != TOKendfunc)
expressions = ParseExpressionList();
- if (expressions.empty())
- return nullptr;
- }
if (!CheckThenNext(TOKendfunc))
return nullptr;
@@ -965,7 +962,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseWhileExpression() {
return nullptr;
auto exprs = ParseExpressionList();
- if (exprs.empty() || !CheckThenNext(TOKendwhile))
+ if (!CheckThenNext(TOKendwhile))
return nullptr;
return pdfium::MakeUnique<CXFA_FMWhileExpression>(
@@ -1023,7 +1020,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForExpression() {
return nullptr;
auto exprs = ParseExpressionList();
- if (exprs.empty() || !CheckThenNext(TOKendfor))
+ if (!CheckThenNext(TOKendfor))
return nullptr;
return pdfium::MakeUnique<CXFA_FMForExpression>(
@@ -1069,7 +1066,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForeachExpression() {
return nullptr;
auto exprs = ParseExpressionList();
- if (exprs.empty() || !CheckThenNext(TOKendfor))
+ if (!CheckThenNext(TOKendfor))
return nullptr;
return pdfium::MakeUnique<CXFA_FMForeachExpression>(
@@ -1089,7 +1086,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseDoExpression() {
return nullptr;
auto exprs = ParseExpressionList();
- if (exprs.empty() || !CheckThenNext(TOKend))
+ if (!CheckThenNext(TOKend))
return nullptr;
return pdfium::MakeUnique<CXFA_FMDoExpression>(