From acee2a8af3b54cf8c3e3161440bda11df826dcf1 Mon Sep 17 00:00:00 2001 From: Andrew Weintraub Date: Thu, 7 Sep 2017 18:15:45 -0400 Subject: Use std::move so this code compiles properly using gcc. R=dsinclair@chromium.org Bug: Change-Id: I34f9498f4e5942c5b10ab2848509de935882321d Reviewed-on: https://pdfium-review.googlesource.com/13470 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- core/fxcrt/xml/cfx_xmlelement.cpp | 4 +++- core/fxcrt/xml/cfx_xmlinstruction.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp index e72b77c4f6..5b5fe45561 100644 --- a/core/fxcrt/xml/cfx_xmlelement.cpp +++ b/core/fxcrt/xml/cfx_xmlelement.cpp @@ -6,6 +6,8 @@ #include "core/fxcrt/xml/cfx_xmlelement.h" +#include + #include "core/fxcrt/cfx_widetextbuf.h" #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlchardata.h" @@ -39,7 +41,7 @@ std::unique_ptr CFX_XMLElement::Clone() { pChild = pChild->m_pNext; } pClone->SetTextData(wsText); - return pClone; + return std::move(pClone); } CFX_WideString CFX_XMLElement::GetLocalTagName() const { diff --git a/core/fxcrt/xml/cfx_xmlinstruction.cpp b/core/fxcrt/xml/cfx_xmlinstruction.cpp index 6886172ee2..3c7deda92a 100644 --- a/core/fxcrt/xml/cfx_xmlinstruction.cpp +++ b/core/fxcrt/xml/cfx_xmlinstruction.cpp @@ -6,6 +6,8 @@ #include "core/fxcrt/xml/cfx_xmlinstruction.h" +#include + #include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" @@ -23,7 +25,7 @@ std::unique_ptr CFX_XMLInstruction::Clone() { auto pClone = pdfium::MakeUnique(GetName()); pClone->SetAttributes(GetAttributes()); pClone->m_TargetData = m_TargetData; - return pClone; + return std::move(pClone); } void CFX_XMLInstruction::AppendData(const CFX_WideString& wsData) { -- cgit v1.2.3