diff options
author | Wei Li <weili@chromium.org> | 2016-03-01 16:29:41 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-01 16:29:41 -0800 |
commit | 0fc6b25e738c311fd66aa9da8c56de50af5644d5 (patch) | |
tree | e148556274b450ae125e2821debebb472f1ba8ee /core/src/fpdfdoc/doc_bookmark.cpp | |
parent | 738b08ce6b9f80d93b815411b47c2b11c2f090f6 (diff) | |
download | pdfium-0fc6b25e738c311fd66aa9da8c56de50af5644d5.tar.xz |
Remove implicit conversions and some cleanup
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1751753002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_bookmark.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_bookmark.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/src/fpdfdoc/doc_bookmark.cpp b/core/src/fpdfdoc/doc_bookmark.cpp index 53e90c0ae1..d7e2e2fcab 100644 --- a/core/src/fpdfdoc/doc_bookmark.cpp +++ b/core/src/fpdfdoc/doc_bookmark.cpp @@ -11,23 +11,24 @@ CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild( const CPDF_Bookmark& parent) const { - if (!parent.m_pDict) { + if (!parent.GetDict()) { CPDF_Dictionary* pRoot = m_pDocument->GetRoot()->GetDictBy("Outlines"); - if (!pRoot) { + if (!pRoot) return CPDF_Bookmark(); - } return CPDF_Bookmark(pRoot->GetDictBy("First")); } - return CPDF_Bookmark(parent.m_pDict->GetDictBy("First")); + return CPDF_Bookmark(parent.GetDict()->GetDictBy("First")); } + CPDF_Bookmark CPDF_BookmarkTree::GetNextSibling( const CPDF_Bookmark& bookmark) const { - if (!bookmark.m_pDict) { + if (!bookmark.GetDict()) return CPDF_Bookmark(); - } - CPDF_Dictionary* pNext = bookmark.m_pDict->GetDictBy("Next"); - return pNext == bookmark.m_pDict ? CPDF_Bookmark() : CPDF_Bookmark(pNext); + + CPDF_Dictionary* pNext = bookmark.GetDict()->GetDictBy("Next"); + return pNext == bookmark.GetDict() ? CPDF_Bookmark() : CPDF_Bookmark(pNext); } + FX_DWORD CPDF_Bookmark::GetColorRef() const { if (!m_pDict) { return 0; |