summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-04 16:00:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-04 16:00:03 -0700
commit931d087b991a986cc8bfa72131fe8eda0d987fc4 (patch)
tree53099f287c7c1dc83349aae6d3930a9462767518 /core/fpdfapi/parser/cpdf_parser.cpp
parent1d08c50d1c20798001a1944e8a1fd76d09643ef1 (diff)
downloadpdfium-931d087b991a986cc8bfa72131fe8eda0d987fc4.tar.xz
Pass object to ReplaceIndirectObjectIfHigherGeneration() by unique_ptr.
Review-Url: https://codereview.chromium.org/2477003002
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 91f157c269..c8c07bd0b7 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -956,9 +956,8 @@ bool CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, bool bMainXRef) {
CPDF_Dictionary* pRootDict = m_pDocument->GetRoot();
if (pRootDict && pRootDict->GetObjNum() == objnum)
return false;
- // Takes ownership of object (std::move someday).
if (!m_pDocument->ReplaceIndirectObjectIfHigherGeneration(
- objnum, pObject.release())) {
+ objnum, std::move(pObject))) {
return false;
}
}