summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document_unittest.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-14 05:57:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-14 05:57:10 -0800
commita9caab94c1f16929e5acf2676117224617d80f53 (patch)
treed71ff9a82fae6e6080deb76375f43056127b3ee2 /core/fpdfapi/parser/cpdf_document_unittest.cpp
parent992ecf7c189e5cabf43e5ad862511cf63d030966 (diff)
downloadpdfium-a9caab94c1f16929e5acf2676117224617d80f53.tar.xz
Avoid the ptr.reset(new XXX()) anti-pattern
Be suspicious of |new|. This removes some of the easy cases. Review-Url: https://codereview.chromium.org/2571913002
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document_unittest.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_document_unittest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_document_unittest.cpp b/core/fpdfapi/parser/cpdf_document_unittest.cpp
index e4fe033c8a..91beba3a6b 100644
--- a/core/fpdfapi/parser/cpdf_document_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_document_unittest.cpp
@@ -108,7 +108,7 @@ class CPDF_TestDocumentWithPageWithoutPageNum : public CPDF_Document {
allPages->Add(CreateNumberedPage(2));
CPDF_Dictionary* pagesDict =
CreatePageTreeNode(std::move(allPages), this, 3);
- m_pOwnedRootDict.reset(new CPDF_Dictionary());
+ m_pOwnedRootDict = pdfium::MakeUnique<CPDF_Dictionary>();
m_pOwnedRootDict->SetNewFor<CPDF_Reference>("Pages", this,
pagesDict->GetObjNum());
m_pRootDict = m_pOwnedRootDict.get();