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

Unified Diff: core/fpdfapi/fpdf_parser/include/cpdf_parser.h

Issue 2136683002: Use smart pointers for class owned member variables (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 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 | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 b468bead9d0666913274074764ab7f0e69e9653f..129118019755301acdaeec2cde7e7eb45905ac99 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;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698