summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-10 20:03:34 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-10 20:03:34 +0000
commit994d8b4e363bb86128593a9000a17b0e79f849f5 (patch)
treed26a21bb890d3795e02a1b9502ce11ceea9ad3eb /xfa/fxfa/fm2js
parentf36a4644b828bd9ad214a42511af91b4a1073eea (diff)
downloadpdfium-994d8b4e363bb86128593a9000a17b0e79f849f5.tar.xz
Remove const args and const_casts where not required.
Introduce const/non-const versions of method where required. Part of the war on const_cast<>. Tidy one expression to use [] instead of .data(). Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433 Reviewed-on: https://pdfium-review.googlesource.com/39852 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmlexer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
index f9771940b6..fd3a61eb21 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
@@ -304,10 +304,8 @@ CXFA_FMToken CXFA_FMLexer::NextToken() {
CXFA_FMToken CXFA_FMLexer::AdvanceForNumber() {
// This will set end to the character after the end of the number.
int32_t used_length = 0;
- if (m_cursor) {
- FXSYS_wcstof(const_cast<wchar_t*>(m_cursor), m_end - m_cursor,
- &used_length);
- }
+ if (m_cursor)
+ FXSYS_wcstof(m_cursor, m_end - m_cursor, &used_length);
const wchar_t* end = m_cursor + used_length;
if (used_length == 0 || !end || FXSYS_iswalpha(*end)) {