summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fmparse.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_fmparse.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_fmparse.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp
index 2d287da3b1..53e94666de 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.cpp
+++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp
@@ -12,17 +12,14 @@
#include "third_party/base/ptr_util.h"
-CXFA_FMParse::CXFA_FMParse() : m_pToken(nullptr), m_pErrorInfo(0) {}
-
-CXFA_FMParse::~CXFA_FMParse() {}
-
-int32_t CXFA_FMParse::Init(const CFX_WideStringC& wsFormcalc,
- CXFA_FMErrorInfo* pErrorInfo) {
- m_pErrorInfo = pErrorInfo;
+CXFA_FMParse::CXFA_FMParse(const CFX_WideStringC& wsFormcalc,
+ CXFA_FMErrorInfo* pErrorInfo)
+ : m_pToken(nullptr), m_pErrorInfo(pErrorInfo) {
m_lexer = pdfium::MakeUnique<CXFA_FMLexer>(wsFormcalc, m_pErrorInfo);
- return 0;
}
+CXFA_FMParse::~CXFA_FMParse() {}
+
void CXFA_FMParse::NextToken() {
m_pToken = m_lexer->NextToken();
while (m_pToken->m_type == TOKreserver) {