Index: fpdfsdk/fpdfdoc_unittest.cpp |
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp |
index 5bda8da9282af3dae5f72589ee06b7784a2429d5..59f9e31e25a7ea1079dad94eeceafc33855b8672 100644 |
--- a/fpdfsdk/fpdfdoc_unittest.cpp |
+++ b/fpdfsdk/fpdfdoc_unittest.cpp |
@@ -79,9 +79,8 @@ class PDFDocTest : public testing::Test { |
std::vector<DictObjInfo> info; |
for (int i = 0; i < num; ++i) { |
// Objects created will be released by the document. |
- CPDF_Dictionary* obj(new CPDF_Dictionary()); |
- m_pIndirectObjs->AddIndirectObject(obj); |
- info.push_back({obj->GetObjNum(), obj}); |
+ CPDF_Dictionary* obj = new CPDF_Dictionary; |
+ info.push_back({m_pIndirectObjs->AddIndirectObject(obj), obj}); |
} |
return info; |
} |