summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/app.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-06-20 14:47:00 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-20 22:26:03 +0000
commit222e1a425e2d2199a842883dcc330a549f400630 (patch)
tree4d28a4fbf3856143ebebbe8b430062a25538bacf /fpdfsdk/javascript/app.cpp
parent995a601c50874729ac40e2cc444b8894cf2aea96 (diff)
downloadpdfium-222e1a425e2d2199a842883dcc330a549f400630.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/app.cpp')
-rw-r--r--fpdfsdk/javascript/app.cpp7
1 files changed, 3 insertions, 4 deletions
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;
}