From 222e1a425e2d2199a842883dcc330a549f400630 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 20 Jun 2017 14:47:00 -0700 Subject: Use early returns in more CPDFSDK_FormFillEnvironment code. Same for CFFL_InteractiveFormFiller. Fix other nits in both classes and in related code. Change-Id: I9901c48794358889cc20638455ffd7fcb3344574 Reviewed-on: https://pdfium-review.googlesource.com/6652 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- fpdfsdk/javascript/app.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/javascript') diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp index c9d7c3fd50..246db66234 100644 --- a/fpdfsdk/javascript/app.cpp +++ b/fpdfsdk/javascript/app.cpp @@ -234,11 +234,10 @@ bool app::calculate(CJS_Runtime* pRuntime, if (vp.IsSetting()) { bool bVP; vp >> bVP; - m_bCalculate = (bool)bVP; - pRuntime->GetFormFillEnv()->GetInterForm()->EnableCalculate( - (bool)m_bCalculate); + m_bCalculate = bVP; + pRuntime->GetFormFillEnv()->GetInterForm()->EnableCalculate(m_bCalculate); } else { - vp << (bool)m_bCalculate; + vp << m_bCalculate; } return true; } -- cgit v1.2.3