From 8e4c505ff6d82263183e9f812fcc7b45c1414f15 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 14 Apr 2016 13:42:44 -0700 Subject: Rename CFX_ByteTextBuf::GetByteString() to AsStringC(). Do the same for CFX_WideTextBuf as well. The name is confusing because these return CFX_ByteStringC, not CFX_ByteString. The AsStringC naming gives parallelism with the string types themselves, and may help to indicate that the result is only good for the lifetime of the object being operated upon. Review URL: https://codereview.chromium.org/1886263003 --- core/fxcrt/fx_xml_parser.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fxcrt/fx_xml_parser.cpp') diff --git a/core/fxcrt/fx_xml_parser.cpp b/core/fxcrt/fx_xml_parser.cpp index b4df4d0532..4b52189142 100644 --- a/core/fxcrt/fx_xml_parser.cpp +++ b/core/fxcrt/fx_xml_parser.cpp @@ -132,7 +132,7 @@ void CXML_Parser::GetName(CFX_ByteString& space, CFX_ByteString& name) { while (m_dwIndex < m_dwBufferSize) { ch = m_pBuffer[m_dwIndex]; if (ch == ':') { - space = buf.GetByteString(); + space = buf.AsStringC(); buf.Clear(); } else if (g_FXCRT_XML_IsNameChar(ch)) { buf.AppendChar(ch); @@ -146,7 +146,7 @@ void CXML_Parser::GetName(CFX_ByteString& space, CFX_ByteString& name) { break; } } while (ReadNextBlock()); - name = buf.GetByteString(); + name = buf.AsStringC(); } void CXML_Parser::SkipLiterals(const CFX_ByteStringC& str) { m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex; @@ -202,7 +202,7 @@ uint32_t CXML_Parser::GetCharRef() { case 1: m_dwIndex++; if (ch == ';') { - CFX_ByteStringC ref = buf.GetByteString(); + CFX_ByteStringC ref = buf.AsStringC(); if (ref == "gt") { code = '>'; } else if (ref == "lt") { @@ -457,7 +457,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent, iState = 10; } else { content << decoder.GetResult(); - CFX_WideString dataStr = content.GetWideString(); + CFX_WideString dataStr = content.AsStringC(); if (!bCDATA && !m_bSaveSpaceChars) { dataStr.TrimRight(L" \t\r\n"); } @@ -501,7 +501,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent, } } while (ReadNextBlock()); content << decoder.GetResult(); - CFX_WideString dataStr = content.GetWideString(); + CFX_WideString dataStr = content.AsStringC(); if (!m_bSaveSpaceChars) { dataStr.TrimRight(L" \t\r\n"); } -- cgit v1.2.3