From e005dc33c31a2e701e1af3a0a3e5775cabbf1ddd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 19 Jun 2018 17:33:32 +0000 Subject: Move fxcrt::{Byte,Wide}Strings with std::move(). Remove some string copies in barcode that were noticed whilst looking for moves. Change-Id: Ieda34d00f633576ba1f0dca283dcdabfb36f236c Reviewed-on: https://pdfium-review.googlesource.com/35410 Reviewed-by: dsinclair Reviewed-by: Tom Sepez Commit-Queue: Tom Sepez --- xfa/fxfa/parser/cxfa_document_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_document_parser.cpp') diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp index 6f3e56ce4c..8bafc7f078 100644 --- a/xfa/fxfa/parser/cxfa_document_parser.cpp +++ b/xfa/fxfa/parser/cxfa_document_parser.cpp @@ -138,7 +138,7 @@ bool GetAttributeLocalName(const WideStringView& wsAttributeName, WideString wsAttrName(wsAttributeName); auto pos = wsAttrName.Find(L':', 0); if (!pos.has_value()) { - wsLocalAttrName = wsAttrName; + wsLocalAttrName = std::move(wsAttrName); return false; } wsLocalAttrName = wsAttrName.Right(wsAttrName.GetLength() - pos.value() - 1); @@ -254,7 +254,7 @@ void ConvertXMLToPlainText(CFX_XMLElement* pRootXMLNode, WideString& wsOutput) { if (IsStringAllWhitespace(wsText)) continue; - wsOutput = wsText; + wsOutput = std::move(wsText); break; } default: -- cgit v1.2.3