From 8f893b69012d4f5029cfedf91c5ef653717257a8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 2 May 2018 18:08:17 +0000 Subject: [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 Commit-Queue: dsinclair --- core/fxcrt/xml/cfx_xmlparser.cpp | 8 ++++---- core/fxcrt/xml/cfx_xmlparser.h | 2 +- 2 files changed, 5 insertions(+), 5 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; } diff --git a/core/fxcrt/xml/cfx_xmlparser.h b/core/fxcrt/xml/cfx_xmlparser.h index 6bf1946402..db8239bd98 100644 --- a/core/fxcrt/xml/cfx_xmlparser.h +++ b/core/fxcrt/xml/cfx_xmlparser.h @@ -71,7 +71,7 @@ class CFX_XMLParser { TargetData }; - void ParseTextChar(wchar_t ch); + void ProcessTextChar(wchar_t ch); bool GetStatus() const; CFX_XMLNode* current_node_ = nullptr; -- cgit v1.2.3