summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_dest.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 17:10:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 00:49:21 +0000
commit655c783b8077f18e17418a3aab9b5a07c8055049 (patch)
treee121b850ead5af67156b126c2e8d2fdcfa4be6a9 /core/fpdfdoc/cpdf_dest.h
parent6f3593c5cdf62915fc086448312671ce1fce5291 (diff)
downloadpdfium-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.h')
-rw-r--r--core/fpdfdoc/cpdf_dest.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h
index 47559495a4..f029d4c031 100644
--- a/core/fpdfdoc/cpdf_dest.h
+++ b/core/fpdfdoc/cpdf_dest.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFDOC_CPDF_DEST_H_
#define CORE_FPDFDOC_CPDF_DEST_H_
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -15,10 +16,12 @@ class CPDF_Object;
class CPDF_Dest {
public:
- CPDF_Dest() : m_pObj(nullptr) {}
- explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) {}
+ CPDF_Dest();
+ CPDF_Dest(const CPDF_Dest& that);
+ explicit CPDF_Dest(CPDF_Object* pObj);
+ ~CPDF_Dest();
- CPDF_Object* GetObject() const { return m_pObj; }
+ CPDF_Object* GetObject() const { return m_pObj.Get(); }
CFX_ByteString GetRemoteName();
int GetPageIndex(CPDF_Document* pDoc);
uint32_t GetPageObjNum();
@@ -33,7 +36,7 @@ class CPDF_Dest {
float* pZoom) const;
private:
- CPDF_Object* m_pObj;
+ CFX_UnownedPtr<CPDF_Object> m_pObj;
};
#endif // CORE_FPDFDOC_CPDF_DEST_H_