Avoid calls to WrapUnique in CPDF_streamparser
Review-Url: https://codereview.chromium.org/2520953004
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index 2901d3b..7b0bf6a 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -128,7 +128,7 @@
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 @@
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() {