From 5a6c1398d0e559fb6a048cb0dca46ba9f9309a77 Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 11 Jul 2016 14:43:40 -0700 Subject: Use smart pointers for class owned member variables Replace raw member variables to smart pointer type to better maintain the ownership and to ease the management. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2136683002 --- core/fpdfapi/fpdf_parser/include/cpdf_parser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_parser/include/cpdf_parser.h') diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h index b468bead9d..1291180197 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h @@ -44,7 +44,7 @@ class CPDF_Parser { CFX_ByteString GetPassword() { return m_Password; } CPDF_Dictionary* GetTrailer() const { return m_pTrailer; } FX_FILESIZE GetLastXRefOffset() const { return m_LastXRefOffset; } - CPDF_Document* GetDocument() const { return m_pDocument; } + CPDF_Document* GetDocument() const { return m_pDocument.get(); } uint32_t GetRootObjNum(); uint32_t GetInfoObjNum(); @@ -118,7 +118,7 @@ class CPDF_Parser { // the objects. bool VerifyCrossRefV4(); - CPDF_Document* m_pDocument; + std::unique_ptr m_pDocument; std::unique_ptr m_pSyntax; bool m_bOwnFileRead; int m_FileVersion; -- cgit v1.2.3