summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-15 12:22:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-15 16:48:44 +0000
commit42059a389449665cdd4056648f9551103bb9c72e (patch)
tree5b0fc3d3df02b3e6b380783911727c48e277a2ae /xfa/fxfa/fm2js
parent2b63ae28236f71e4df9c26b66cfca2905ceec512 (diff)
downloadpdfium-42059a389449665cdd4056648f9551103bb9c72e.tar.xz
Cleanup nits from prior CLs
Change-Id: Ie69dfc32e7b526eca2ac6ae621eed879ad98476e Reviewed-on: https://pdfium-review.googlesource.com/3054 Commit-Queue: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp
index 5d3f6f5890..7ccd4773fb 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.cpp
+++ b/xfa/fxfa/fm2js/xfa_lexer.cpp
@@ -62,9 +62,9 @@ inline bool XFA_FMDChar::isAvalid(const wchar_t* p, bool flag) {
inline bool XFA_FMDChar::string2number(const wchar_t* s,
double* pValue,
const wchar_t*& pEnd) {
- if (s) {
- *pValue = wcstod((wchar_t*)s, (wchar_t**)&pEnd);
- }
+ if (s)
+ *pValue = wcstod(const_cast<wchar_t*>(s), const_cast<wchar_t**>(&pEnd));
+
return 0;
}
@@ -404,12 +404,11 @@ uint32_t CXFA_FMLexer::Number(CXFA_FMToken* t,
const wchar_t* p,
const wchar_t*& pEnd) {
double number = 0;
- if (XFA_FMDChar::string2number(p, &number, pEnd)) {
+ if (XFA_FMDChar::string2number(p, &number, pEnd))
return 1;
- }
- if (pEnd && XFA_FMDChar::isAlpha(pEnd)) {
+ if (pEnd && XFA_FMDChar::isAlpha(pEnd))
return 1;
- }
+
t->m_wstring = CFX_WideStringC(p, (pEnd - p));
return 0;
}