summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_xml_parser.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-04 16:41:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-04 16:41:35 -0700
commit28f97ff783c16f3391384ce97b765ce4eb310ac7 (patch)
tree69c4c8bc9dd39d5336c96f28b633d197dd207c81 /core/fxcrt/fx_xml_parser.cpp
parented9c4386713084f37548b46ab36f618021f716f5 (diff)
downloadpdfium-28f97ff783c16f3391384ce97b765ce4eb310ac7.tar.xz
Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC.
Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002
Diffstat (limited to 'core/fxcrt/fx_xml_parser.cpp')
-rw-r--r--core/fxcrt/fx_xml_parser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fxcrt/fx_xml_parser.cpp b/core/fxcrt/fx_xml_parser.cpp
index 9cdf73ca90..b39c32bfbd 100644
--- a/core/fxcrt/fx_xml_parser.cpp
+++ b/core/fxcrt/fx_xml_parser.cpp
@@ -371,7 +371,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
}
CXML_Element* pElement = new CXML_Element;
pElement->m_pParent = pParent;
- pElement->SetTag(tag_space, tag_name);
+ pElement->SetTag(tag_space.AsByteStringC(), tag_name.AsByteStringC());
do {
CFX_ByteString attr_space, attr_name;
while (m_dwIndex < m_dwBufferSize) {
@@ -397,7 +397,8 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
}
CFX_WideString attr_value;
GetAttrValue(attr_value);
- pElement->m_AttrMap.SetAt(attr_space, attr_name, attr_value);
+ pElement->m_AttrMap.SetAt(attr_space.AsByteStringC(),
+ attr_name.AsByteStringC(), attr_value);
}
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (m_dwIndex < m_dwBufferSize || IsEOF()) {
@@ -600,7 +601,7 @@ CFX_ByteString CXML_Element::GetNamespace(FX_BOOL bQualified) const {
if (bQualified) {
return m_QSpaceName;
}
- return GetNamespaceURI(m_QSpaceName);
+ return GetNamespaceURI(m_QSpaceName.AsByteStringC());
}
CFX_ByteString CXML_Element::GetNamespaceURI(
const CFX_ByteStringC& qName) const {