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

Unified Diff: core/fpdfapi/page/cpdf_streamparser.cpp

Issue 2520953004: Avoid calls to WrapUnique in CPDF_streamparser (Closed)
Patch Set: assign unique_ptr 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/page/cpdf_streamcontentparser.cpp ('k') | core/fpdfapi/page/pageint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/page/cpdf_streamparser.cpp
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index 2901d3b50baf25f91257706f121c0f0af5fe73f7..7b0bf6ae03e1b3342ef90556c00dc2341afaa859 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -128,7 +128,7 @@ CPDF_StreamParser::~CPDF_StreamParser() {}
std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream(
CPDF_Document* pDoc,
- CPDF_Dictionary* pDict,
+ std::unique_ptr<CPDF_Dictionary> pDict,
CPDF_Object* pCSObj) {
if (m_Pos == m_Size)
return nullptr;
@@ -231,8 +231,7 @@ std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream(
m_Pos += dwStreamSize;
}
pDict->SetNewFor<CPDF_Number>("Length", (int)dwStreamSize);
- return pdfium::MakeUnique<CPDF_Stream>(pData, dwStreamSize,
- pdfium::WrapUnique(pDict));
+ return pdfium::MakeUnique<CPDF_Stream>(pData, dwStreamSize, std::move(pDict));
}
CPDF_StreamParser::SyntaxType CPDF_StreamParser::ParseNextElement() {
« no previous file with comments | « core/fpdfapi/page/cpdf_streamcontentparser.cpp ('k') | core/fpdfapi/page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698