Remove unused `CPDF_StructElement::m_pParent`.
It is always nullptr.
Change-Id: I8fd9348c67f8f3bf763ae74665406a35f019bcb6
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86173
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpdf_structelement.cpp b/core/fpdfdoc/cpdf_structelement.cpp
index f4e0630..344b4fe 100644
--- a/core/fpdfdoc/cpdf_structelement.cpp
+++ b/core/fpdfdoc/cpdf_structelement.cpp
@@ -40,10 +40,8 @@
CPDF_StructElement::Kid::~Kid() = default;
CPDF_StructElement::CPDF_StructElement(const CPDF_StructTree* pTree,
- const CPDF_StructElement* pParent,
const CPDF_Dictionary* pDict)
: m_pTree(pTree),
- m_pParent(pParent),
m_pDict(pDict),
m_Type(GetStructElementType(m_pTree.Get(), m_pDict.Get())) {
LoadKids(m_pDict.Get());
diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h
index d8579b8..3b7a375 100644
--- a/core/fpdfdoc/cpdf_structelement.h
+++ b/core/fpdfdoc/cpdf_structelement.h
@@ -50,7 +50,6 @@
};
CPDF_StructElement(const CPDF_StructTree* pTree,
- const CPDF_StructElement* pParent,
const CPDF_Dictionary* pDict);
~CPDF_StructElement() override;
@@ -58,7 +57,6 @@
void LoadKid(uint32_t PageObjNum, const CPDF_Object* pKidObj, Kid* pKid);
UnownedPtr<const CPDF_StructTree> const m_pTree;
- UnownedPtr<const CPDF_StructElement> const m_pParent;
RetainPtr<const CPDF_Dictionary> const m_pDict;
const ByteString m_Type;
std::vector<Kid> m_Kids;
diff --git a/core/fpdfdoc/cpdf_structtree.cpp b/core/fpdfdoc/cpdf_structtree.cpp
index 3829315..26c3395 100644
--- a/core/fpdfdoc/cpdf_structtree.cpp
+++ b/core/fpdfdoc/cpdf_structtree.cpp
@@ -93,7 +93,7 @@
if (it != map->end())
return it->second;
- auto pElement = pdfium::MakeRetain<CPDF_StructElement>(this, nullptr, pDict);
+ auto pElement = pdfium::MakeRetain<CPDF_StructElement>(this, pDict);
(*map)[pDict] = pElement;
const CPDF_Dictionary* pParent = pDict->GetDictFor("P");
if (!pParent || pParent->GetNameFor("Type") == "StructTreeRoot") {