summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_program.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-05-16 12:17:50 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-16 16:29:23 +0000
commitc0d358ad234843a524a1bcc2a439f08ad0c64aa1 (patch)
treedfb046a476f5dece9f76764415e6f297591f1829 /xfa/fxfa/fm2js/xfa_program.cpp
parent2eef64cba5c8e08a9e625f4aba5a7fbdc8e62bad (diff)
downloadpdfium-c0d358ad234843a524a1bcc2a439f08ad0c64aa1.tar.xz
Update formcalc return types
Update return types to be bools instead of ints. Make some methods private. Change-Id: I5d55c48a861f90e9bd116ef835c11cdb515002a6 Reviewed-on: https://pdfium-review.googlesource.com/5553 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_program.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_program.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/fm2js/xfa_program.cpp b/xfa/fxfa/fm2js/xfa_program.cpp
index 6afe332629..8e5aa5ec3b 100644
--- a/xfa/fxfa/fm2js/xfa_program.cpp
+++ b/xfa/fxfa/fm2js/xfa_program.cpp
@@ -16,25 +16,25 @@ CXFA_FMProgram::CXFA_FMProgram(const CFX_WideStringC& wsFormcalc)
CXFA_FMProgram::~CXFA_FMProgram() {}
-int32_t CXFA_FMProgram::ParseProgram() {
+bool CXFA_FMProgram::ParseProgram() {
m_parse.NextToken();
if (!m_pErrorInfo.message.IsEmpty())
- return -1;
+ return false;
std::vector<std::unique_ptr<CXFA_FMExpression>> expressions =
m_parse.ParseTopExpression();
if (!m_pErrorInfo.message.IsEmpty())
- return -1;
+ return false;
std::vector<CFX_WideStringC> arguments;
m_globalFunction = pdfium::MakeUnique<CXFA_FMFunctionDefinition>(
1, true, L"", std::move(arguments), std::move(expressions));
- return 0;
+ return true;
}
-int32_t CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf& wsJavaScript) {
+bool CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf& wsJavaScript) {
if (!m_globalFunction->ToJavaScript(wsJavaScript))
- return -1;
+ return false;
wsJavaScript.AppendChar(0);
- return 0;
+ return true;
}