Merge to XFA: Make conversion between CPDF_Dest and its object explicit.
[pdfium.git] / core / include / fpdfdoc / fpdf_doc.h
index a21063f..5e3e11a 100644 (file)
@@ -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