diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-23 17:10:46 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-24 00:49:21 +0000 |
commit | 655c783b8077f18e17418a3aab9b5a07c8055049 (patch) | |
tree | e121b850ead5af67156b126c2e8d2fdcfa4be6a9 /core/fpdfdoc/cpdf_dest.cpp | |
parent | 6f3593c5cdf62915fc086448312671ce1fce5291 (diff) | |
download | pdfium-655c783b8077f18e17418a3aab9b5a07c8055049.tar.xz |
Convert to CFX_UnownedPtr, part 3.
Remove an explicit clear to re-order the member
destruction order.
Change-Id: I33da3f3de4b8e8e0cfbdceaf5140e98f5d6f904a
Reviewed-on: https://pdfium-review.googlesource.com/5791
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_dest.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_dest.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_dest.cpp b/core/fpdfdoc/cpdf_dest.cpp index ca380be957..3e1988dd5e 100644 --- a/core/fpdfdoc/cpdf_dest.cpp +++ b/core/fpdfdoc/cpdf_dest.cpp @@ -18,8 +18,16 @@ const char* const g_sZoomModes[] = {"XYZ", "Fit", "FitH", "FitV", "FitR", } // namespace +CPDF_Dest::CPDF_Dest() {} + +CPDF_Dest::CPDF_Dest(const CPDF_Dest& pObj) = default; + +CPDF_Dest::CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) {} + +CPDF_Dest::~CPDF_Dest() {} + int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { - CPDF_Array* pArray = ToArray(m_pObj); + CPDF_Array* pArray = ToArray(m_pObj.Get()); if (!pArray) return 0; @@ -34,7 +42,7 @@ int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { } uint32_t CPDF_Dest::GetPageObjNum() { - CPDF_Array* pArray = ToArray(m_pObj); + CPDF_Array* pArray = ToArray(m_pObj.Get()); if (!pArray) return 0; @@ -49,7 +57,7 @@ uint32_t CPDF_Dest::GetPageObjNum() { } int CPDF_Dest::GetZoomMode() { - CPDF_Array* pArray = ToArray(m_pObj); + CPDF_Array* pArray = ToArray(m_pObj.Get()); if (!pArray) return 0; @@ -76,7 +84,7 @@ bool CPDF_Dest::GetXYZ(bool* pHasX, *pHasY = false; *pHasZoom = false; - CPDF_Array* pArray = ToArray(m_pObj); + CPDF_Array* pArray = ToArray(m_pObj.Get()); if (!pArray) return false; @@ -114,7 +122,7 @@ bool CPDF_Dest::GetXYZ(bool* pHasX, } float CPDF_Dest::GetParam(int index) { - CPDF_Array* pArray = ToArray(m_pObj); + CPDF_Array* pArray = ToArray(m_pObj.Get()); return pArray ? pArray->GetNumberAt(2 + index) : 0; } |