From bdf3f682d14df4d51bdded89cc897a27112e4934 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 26 Jun 2018 21:44:34 +0000 Subject: Use UnownedPtr<> in cpdf_streamcontentparser Change-Id: I558ac625d842d1b3d9dfdaf4d7661d4c02c6244a Reviewed-on: https://pdfium-review.googlesource.com/36133 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- core/fpdfapi/page/cpdf_streamcontentparser.cpp | 4 ++-- core/fpdfapi/page/cpdf_streamcontentparser.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/page') diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 8f3e70a278..0a03ed1949 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -61,7 +61,7 @@ const char kPathOperatorRectangle[] = "re"; class CPDF_StreamParserAutoClearer { public: - CPDF_StreamParserAutoClearer(CPDF_StreamParser** scoped_variable, + CPDF_StreamParserAutoClearer(UnownedPtr* scoped_variable, CPDF_StreamParser* new_parser) : scoped_variable_(scoped_variable) { *scoped_variable_ = new_parser; @@ -69,7 +69,7 @@ class CPDF_StreamParserAutoClearer { ~CPDF_StreamParserAutoClearer() { *scoped_variable_ = nullptr; } private: - CPDF_StreamParser** scoped_variable_; + UnownedPtr* scoped_variable_; }; CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h index a5efe48d46..e972118861 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.h +++ b/core/fpdfapi/page/cpdf_streamcontentparser.h @@ -217,7 +217,7 @@ class CPDF_StreamContentParser { const CFX_FloatRect m_BBox; uint32_t m_ParamStartPos; uint32_t m_ParamCount; - CPDF_StreamParser* m_pSyntax; + UnownedPtr m_pSyntax; std::unique_ptr m_pCurStates; CPDF_ContentMark m_CurContentMark; std::vector> m_ClipTextList; -- cgit v1.2.3