summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2016-12-01 15:15:49 -0500
committerChromium commit bot <commit-bot@chromium.org>2016-12-01 20:34:10 +0000
commit991f61869cfba58206cc7ec038fe8d5305bbb2ba (patch)
tree5935ae9cecb17d07cbd2023cefc429050fdb5319 /xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
parent8a463c5a1a2252b5fdbff3b5ab07d50273bbc391 (diff)
downloadpdfium-991f61869cfba58206cc7ec038fe8d5305bbb2ba.tar.xz
Move Init to constructor in CXFA_FMProgram
Change-Id: I6b2d1a5b06211b32f3053aad4d7ae7501ec8d8f6 Reviewed-on: https://pdfium-review.googlesource.com/2093 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 4394455c74..8bcdcdda31 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -6482,14 +6482,8 @@ int32_t CXFA_FM2JSContext::Translate(const CFX_WideStringC& wsFormcalc,
wsError.clear();
return 0;
}
- int32_t status = 0;
- CXFA_FMProgram program;
- status = program.Init(wsFormcalc);
- if (status) {
- wsError = program.GetError().message;
- return status;
- }
- status = program.ParseProgram();
+ CXFA_FMProgram program(wsFormcalc);
+ int32_t status = program.ParseProgram();
if (status) {
wsError = program.GetError().message;
return status;