From 34c509e0e0fbd64d4380f130c48434b07f60b69e Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Fri, 30 Oct 2015 15:28:47 -0700 Subject: Convert a bunch of raw pointers in fsdk_mgr to unique_ptrs. R=tsepez@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1425233002 . --- fpdfsdk/include/fsdk_mgr.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index 2cc528265d..ae4e16368c 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -205,7 +205,7 @@ class CPDFDoc_Environment final { CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; } CPDF_Document* GetPDFDocument() const { return m_pPDFDoc; } CFX_ByteString GetAppName() const { return ""; } - IFX_SystemHandler* GetSysHandler() const { return m_pSysHandler; } + IFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } CFFL_IFormFiller* GetIFormFiller(); // Creates if not present. @@ -214,14 +214,14 @@ class CPDFDoc_Environment final { CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. private: - CPDFSDK_AnnotHandlerMgr* m_pAnnotHandlerMgr; - CPDFSDK_ActionHandler* m_pActionHandler; + nonstd::unique_ptr m_pAnnotHandlerMgr; + nonstd::unique_ptr m_pActionHandler; nonstd::unique_ptr m_pJSRuntime; FPDF_FORMFILLINFO* const m_pInfo; CPDFSDK_Document* m_pSDKDoc; CPDF_Document* const m_pPDFDoc; - CFFL_IFormFiller* m_pIFormFiller; - IFX_SystemHandler* m_pSysHandler; + nonstd::unique_ptr m_pIFormFiller; + nonstd::unique_ptr m_pSysHandler; }; class CPDFSDK_Document { @@ -278,10 +278,10 @@ class CPDFSDK_Document { private: std::map m_pageMap; CPDF_Document* m_pDoc; - CPDFSDK_InterForm* m_pInterForm; + nonstd::unique_ptr m_pInterForm; CPDFSDK_Annot* m_pFocusAnnot; CPDFDoc_Environment* m_pEnv; - CPDF_OCContext* m_pOccontent; + nonstd::unique_ptr m_pOccontent; FX_BOOL m_bChangeMask; FX_BOOL m_bBeingDestroyed; }; -- cgit v1.2.3