summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fxfa/fm2js/cxfa_fmlexer.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmlexer.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmlexer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
index 1a43e837f4..f6b2a58944 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
@@ -122,7 +122,7 @@ const wchar_t* tokenStrings[] = {
L"TOKcall", L"TOKstring", L"TOKnumber", L"TOKreserver",
};
-XFA_FM_TOKEN TokenizeIdentifier(const CFX_WideStringC& str) {
+XFA_FM_TOKEN TokenizeIdentifier(const WideStringView& str) {
uint32_t key = FX_HashCode_GetW(str, true);
const XFA_FMKeyword* end = std::begin(keyWords) + KEYWORD_END + 1;
@@ -145,8 +145,8 @@ CXFA_FMToken::CXFA_FMToken(uint32_t line_num)
CXFA_FMToken::~CXFA_FMToken() {}
-CFX_WideString CXFA_FMToken::ToDebugString() const {
- CFX_WideString str(L"type = ");
+WideString CXFA_FMToken::ToDebugString() const {
+ WideString str(L"type = ");
str += tokenStrings[m_type];
str += L", string = ";
str += m_string;
@@ -155,7 +155,7 @@ CFX_WideString CXFA_FMToken::ToDebugString() const {
return str;
}
-CXFA_FMLexer::CXFA_FMLexer(const CFX_WideStringC& wsFormCalc)
+CXFA_FMLexer::CXFA_FMLexer(const WideStringView& wsFormCalc)
: m_cursor(wsFormCalc.unterminated_c_str()),
m_end(m_cursor + wsFormCalc.GetLength() - 1),
m_current_line(1),
@@ -378,7 +378,7 @@ void CXFA_FMLexer::AdvanceForNumber() {
}
m_token->m_string =
- CFX_WideStringC(m_cursor, static_cast<FX_STRSIZE>(end - m_cursor));
+ WideStringView(m_cursor, static_cast<FX_STRSIZE>(end - m_cursor));
m_cursor = end;
}
@@ -395,7 +395,7 @@ void CXFA_FMLexer::AdvanceForString() {
// If the end of the input has been reached it was not escaped.
if (m_cursor > m_end) {
m_token->m_string =
- CFX_WideStringC(start, static_cast<FX_STRSIZE>(m_cursor - start));
+ WideStringView(start, static_cast<FX_STRSIZE>(m_cursor - start));
return;
}
// If the next character is not a " then the end of the string has been
@@ -404,7 +404,7 @@ void CXFA_FMLexer::AdvanceForString() {
if (!IsFormCalcCharacter(*m_cursor)) {
break;
}
- m_token->m_string = CFX_WideStringC(start, (m_cursor - start));
+ m_token->m_string = WideStringView(start, (m_cursor - start));
return;
}
}
@@ -430,7 +430,7 @@ void CXFA_FMLexer::AdvanceForIdentifier() {
++m_cursor;
}
m_token->m_string =
- CFX_WideStringC(start, static_cast<FX_STRSIZE>(m_cursor - start));
+ WideStringView(start, static_cast<FX_STRSIZE>(m_cursor - start));
m_token->m_type = TokenizeIdentifier(m_token->m_string);
}