Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1309)

Unified Diff: core/fpdfapi/parser/cpdf_syntax_parser.cpp

Issue 2498223005: Make CPDF_Array take unique_ptrs (Closed)
Patch Set: nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_object_unittest.cpp ('k') | core/fpdfdoc/cpdf_dest_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_syntax_parser.cpp
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 842ef2b22201143cbda709303041412adf3c8a30..6a3db602860adfaacc3be4bd82dcce808b7d874e 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -414,7 +414,7 @@ std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObject(
std::unique_ptr<CPDF_Array> pArray = pdfium::MakeUnique<CPDF_Array>();
while (std::unique_ptr<CPDF_Object> pObj =
GetObject(pObjList, objnum, gennum, true)) {
- pArray->Add(pObj.release());
+ pArray->Add(std::move(pObj));
}
return std::move(pArray);
}
@@ -534,7 +534,7 @@ std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObjectForStrict(
std::unique_ptr<CPDF_Array> pArray = pdfium::MakeUnique<CPDF_Array>();
while (std::unique_ptr<CPDF_Object> pObj =
GetObject(pObjList, objnum, gennum, true)) {
- pArray->Add(pObj.release());
+ pArray->Add(std::move(pObj));
}
return m_WordBuffer[0] == ']' ? std::move(pArray) : nullptr;
}
« no previous file with comments | « core/fpdfapi/parser/cpdf_object_unittest.cpp ('k') | core/fpdfdoc/cpdf_dest_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698