diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-23 16:18:28 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-24 01:28:39 +0000 |
commit | 033e565d8244953afe8eab3d0c7ee1ed9863c921 (patch) | |
tree | 410cbe152379180ff2fd3411b289be6fa31e3c82 /core/fpdfdoc/cpdf_nametree.h | |
parent | 655c783b8077f18e17418a3aab9b5a07c8055049 (diff) | |
download | pdfium-033e565d8244953afe8eab3d0c7ee1ed9863c921.tar.xz |
Convert to CFX_UnownedPtr, part 5
Change-Id: Ibdb20fca7e4daae9d61286df4801ac02faf3b281
Reviewed-on: https://pdfium-review.googlesource.com/5831
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_nametree.h')
-rw-r--r-- | core/fpdfdoc/cpdf_nametree.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_nametree.h b/core/fpdfdoc/cpdf_nametree.h index 7a792aef59..69000f32b2 100644 --- a/core/fpdfdoc/cpdf_nametree.h +++ b/core/fpdfdoc/cpdf_nametree.h @@ -7,6 +7,7 @@ #ifndef CORE_FPDFDOC_CPDF_NAMETREE_H_ #define CORE_FPDFDOC_CPDF_NAMETREE_H_ +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_string.h" class CPDF_Array; @@ -16,8 +17,9 @@ class CPDF_Object; class CPDF_NameTree { public: - explicit CPDF_NameTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} + explicit CPDF_NameTree(CPDF_Dictionary* pRoot); CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteString& category); + ~CPDF_NameTree(); CPDF_Object* LookupValueAndName(int nIndex, CFX_ByteString* csName) const; CPDF_Object* LookupValue(const CFX_ByteString& csName) const; @@ -25,10 +27,10 @@ class CPDF_NameTree { int GetIndex(const CFX_ByteString& csName) const; size_t GetCount() const; - CPDF_Dictionary* GetRoot() const { return m_pRoot; } + CPDF_Dictionary* GetRoot() const { return m_pRoot.Get(); } private: - CPDF_Dictionary* m_pRoot; + CFX_UnownedPtr<CPDF_Dictionary> m_pRoot; }; #endif // CORE_FPDFDOC_CPDF_NAMETREE_H_ |