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

Unified Diff: fpdfsdk/fpdfdoc_unittest.cpp

Issue 2345063002: Use string pools in some dictionaries (Closed)
Patch Set: Remove default ctor Created 4 years, 3 months 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
Index: fpdfsdk/fpdfdoc_unittest.cpp
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp
index 5bda8da9282af3dae5f72589ee06b7784a2429d5..8181851a5fc38fd46741409734f348fb279a6b7c 100644
--- a/fpdfsdk/fpdfdoc_unittest.cpp
+++ b/fpdfsdk/fpdfdoc_unittest.cpp
@@ -64,7 +64,7 @@ class PDFDocTest : public testing::Test {
m_pDoc.reset(new CPDF_TestPdfDocument());
m_pIndirectObjs = m_pDoc->GetHolder();
// Setup the root directory.
- m_pRootObj.reset(new CPDF_Dictionary());
+ m_pRootObj.reset(new CPDF_Dictionary(nullptr));
m_pDoc->SetRoot(m_pRootObj.get());
}
@@ -79,7 +79,7 @@ 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());
+ CPDF_Dictionary* obj(new CPDF_Dictionary(nullptr));
m_pIndirectObjs->AddIndirectObject(obj);
info.push_back({obj->GetObjNum(), obj});
}
@@ -104,7 +104,7 @@ TEST_F(PDFDocTest, FindBookmark) {
}
{
// Empty bookmark tree.
- m_pRootObj->SetFor("Outlines", new CPDF_Dictionary());
+ m_pRootObj->SetFor("Outlines", new CPDF_Dictionary(nullptr));
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title =
GetFPDFWideString(L"");
EXPECT_EQ(nullptr, FPDFBookmark_Find(m_pDoc.get(), title.get()));

Powered by Google App Engine
This is Rietveld 408576698