From e53460ff2697299d42518f587c42409b0bd673df Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 19 Feb 2018 18:34:03 +0000 Subject: Remove extraneous HasError checks Duplicate checks, remove. Change-Id: Ic2f49651c50ed66328233817bc8cd24f7c9636c2 Reviewed-on: https://pdfium-review.googlesource.com/27330 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/fm2js/cxfa_fmparser.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'xfa') diff --git a/xfa/fxfa/fm2js/cxfa_fmparser.cpp b/xfa/fxfa/fm2js/cxfa_fmparser.cpp index 536075b298..8baa59fb25 100644 --- a/xfa/fxfa/fm2js/cxfa_fmparser.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmparser.cpp @@ -663,9 +663,6 @@ std::unique_ptr CXFA_FMParser::ParsePostExpression( if (HasError() || !IncrementParseDepthAndCheck()) return nullptr; - if (HasError()) - return nullptr; - uint32_t line = m_lexer->GetCurrentLine(); size_t expr_count = 0; while (1) { @@ -947,9 +944,6 @@ std::unique_ptr CXFA_FMParser::ParseBlockExpression() { if (HasError() || !IncrementParseDepthAndCheck()) return nullptr; - if (HasError()) - return nullptr; - uint32_t line = m_lexer->GetCurrentLine(); std::vector> expressions; while (1) { @@ -1082,9 +1076,6 @@ CXFA_FMParser::ParseSubassignmentInForExpression() { if (HasError() || !IncrementParseDepthAndCheck()) return nullptr; - if (HasError()) - return nullptr; - if (m_token.m_type != TOKidentifier) { m_error = true; return nullptr; @@ -1169,9 +1160,6 @@ std::unique_ptr CXFA_FMParser::ParseForeachExpression() { if (HasError() || !IncrementParseDepthAndCheck()) return nullptr; - if (HasError()) - return nullptr; - std::unique_ptr expr; WideStringView wsIdentifier; std::vector> pAccessors; @@ -1218,9 +1206,6 @@ std::unique_ptr CXFA_FMParser::ParseDoExpression() { if (HasError() || !IncrementParseDepthAndCheck()) return nullptr; - if (HasError()) - return nullptr; - uint32_t line = m_lexer->GetCurrentLine(); if (!NextToken()) return nullptr; -- cgit v1.2.3