summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-02 18:08:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-02 18:08:17 +0000
commit8f893b69012d4f5029cfedf91c5ef653717257a8 (patch)
tree63029b0459277aee7d87c6e6d986885f42b78a54 /core/fxcrt/xml/cfx_xmlparser.cpp
parent9bd3566d82deb39ea282ddafa4f89930160e637c (diff)
downloadpdfium-8f893b69012d4f5029cfedf91c5ef653717257a8.tar.xz
[xml] Rename CFX_XMLParser::ParseTextChar
This CL renames ParseTextChar to ProcessTextChar to make the usage clearer. The method does not do any parsing, it just decides if the char is part of an entity or not. Change-Id: I9b70a82a421b02e2352cd07bd88b1e581d8578b7 Reviewed-on: https://pdfium-review.googlesource.com/31930 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlparser.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlparser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index b7dbd19eab..b484660f1f 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -211,7 +211,7 @@ FX_XmlSyntaxResult CFX_XMLParser::DoSyntaxParse() {
m_syntaxParserState = FDE_XmlSyntaxState::Node;
}
} else {
- ParseTextChar(ch);
+ ProcessTextChar(ch);
}
break;
case FDE_XmlSyntaxState::Node:
@@ -340,7 +340,7 @@ FX_XmlSyntaxResult CFX_XMLParser::DoSyntaxParse() {
m_syntaxParserState = FDE_XmlSyntaxState::AttriName;
syntaxParserResult = FX_XmlSyntaxResult::AttriValue;
} else {
- ParseTextChar(ch);
+ ProcessTextChar(ch);
}
break;
case FDE_XmlSyntaxState::CloseInstruction:
@@ -519,7 +519,7 @@ bool CFX_XMLParser::GetStatus() const {
return m_pStream && m_syntaxParserResult != FX_XmlSyntaxResult::Error;
}
-void CFX_XMLParser::ParseTextChar(wchar_t character) {
+void CFX_XMLParser::ProcessTextChar(wchar_t character) {
current_text_.push_back(character);
if (m_iEntityStart > -1 && character == L';') {
@@ -578,8 +578,8 @@ void CFX_XMLParser::ParseTextChar(wchar_t character) {
WideString CFX_XMLParser::GetTextData() {
WideString ret(current_text_.data(), current_text_.size());
- current_text_.clear();
m_iEntityStart = -1;
+ current_text_.clear();
current_text_.reserve(kCurrentTextReserve);
return ret;
}