summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/include
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-07-11 14:43:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-11 14:43:41 -0700
commit5a6c1398d0e559fb6a048cb0dca46ba9f9309a77 (patch)
tree40193eaf374d0f9bf2ec2f257871279b0f36efb8 /core/fpdfapi/fpdf_parser/include
parentac14258c429141653f73ca5c1b64ad259ac15804 (diff)
downloadpdfium-5a6c1398d0e559fb6a048cb0dca46ba9f9309a77.tar.xz
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
Diffstat (limited to 'core/fpdfapi/fpdf_parser/include')
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_parser.h4
1 files changed, 2 insertions, 2 deletions
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<CPDF_Document> m_pDocument;
std::unique_ptr<CPDF_SyntaxParser> m_pSyntax;
bool m_bOwnFileRead;
int m_FileVersion;