From 007e6c0f9559412788b903bcb6a7601e220c3be8 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 26 Feb 2016 14:31:56 -0800 Subject: Remove some FX_BOOLs Grepping for FX_BOOL and |==| on the same line gives a very strong clue that the expression won't be out of range of the |bool| type iteself. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736323003 . --- fpdfsdk/src/javascript/Document.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fpdfsdk/src/javascript') diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 8b2b315ae8..4d774426f0 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -622,8 +622,7 @@ FX_BOOL Document::submitForm(IJS_Context* cc, CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); - FX_BOOL bAll = (aFields.GetLength() == 0); - if (bAll && bEmpty) { + if (aFields.GetLength() == 0 && bEmpty) { if (pPDFInterForm->CheckRequiredFields(nullptr, true)) { pRuntime->BeginBlock(); pInterForm->SubmitForm(strURL, FALSE); -- cgit v1.2.3