summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document_parser.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-21 15:21:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-21 15:21:44 +0000
commita964f2a5ab09dc01d09fad78f940ee8e0e5c0c04 (patch)
tree8334a6a67d9fc8c61b215e0889920f7f1c4cfe04 /xfa/fxfa/parser/cxfa_document_parser.cpp
parent9c292fef316739f43730f11b9a2b6d3e4b725b54 (diff)
downloadpdfium-a964f2a5ab09dc01d09fad78f940ee8e0e5c0c04.tar.xz
Remove WideString::c_str() calls where possible.
Many of these cause a string duplication as we go from Widestring => c_str => Widestring Change-Id: I0dfa952e66f89138e719ff9200db3d9397839e28 Reviewed-on: https://pdfium-review.googlesource.com/35790 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document_parser.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index 8bafc7f078..599662a160 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -1000,10 +1000,9 @@ void CXFA_DocumentParser::ParseDataGroup(CXFA_Node* pXFANode,
pXFAMetaData->SetFlag(XFA_NodeFlag_Initialized);
}
- if (!bNeedValue) {
- WideString wsNilName(L"xsi:nil");
- pXMLElement->RemoveAttribute(wsNilName.c_str());
- }
+ if (!bNeedValue)
+ pXMLElement->RemoveAttribute(L"xsi:nil");
+
pXFANode->InsertChild(pXFAChild, nullptr);
if (eNodeType == XFA_Element::DataGroup)
ParseDataGroup(pXFAChild, pXMLElement, ePacketID);