Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 984703004: Make conversion to CPDF_Dest explicit (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfdoc/fpdf_doc.h
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index dbcc7f433e08546e99f764edb36fedf1525d0699..dac215e711b10dc3733d6dfea41b419195a38395 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -124,28 +124,19 @@ public:
class CPDF_Dest : public CFX_Object
{
public:
+ CPDF_Dest() : m_pObj(nullptr) { }
+ explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { }
- CPDF_Dest(CPDF_Object* pObj = NULL)
- {
- m_pObj = pObj;
- }
-
- operator CPDF_Object* () const
- {
- return m_pObj;
- }
+ operator bool () const { return m_pObj != NULL; }
+ CPDF_Object* GetObject() const { return m_pObj; }
CFX_ByteString GetRemoteName();
-
int GetPageIndex(CPDF_Document* pDoc);
-
FX_DWORD GetPageObjNum();
-
int GetZoomMode();
-
FX_FLOAT GetParam(int index);
-
+protected:
CPDF_Object* m_pObj;
};
class CPDF_OCContext : public CFX_Object, public IPDF_OCContext
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698