Index: core/fpdfapi/page/cpdf_streamcontentparser.h |
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h |
index 1ed2aaa4de9b116672edf3cfc8f537898c0d615d..dfb52308093e3d9f76394fb6672e699c0765efe5 100644 |
--- a/core/fpdfapi/page/cpdf_streamcontentparser.h |
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.h |
@@ -52,21 +52,23 @@ class CPDF_StreamContentParser { |
private: |
struct ContentParam { |
enum Type { OBJECT = 0, NUMBER, NAME }; |
+ |
+ ContentParam(); |
+ ~ContentParam(); |
+ |
Type m_Type; |
- union { |
- struct { |
- bool m_bInteger; |
- union { |
- int m_Integer; |
- FX_FLOAT m_Float; |
- }; |
- } m_Number; |
- CPDF_Object* m_pObject; |
- struct { |
- int m_Len; |
- char m_Buffer[32]; |
- } m_Name; |
- }; |
+ std::unique_ptr<CPDF_Object> m_pObject; |
+ struct { |
+ bool m_bInteger; |
+ union { |
+ int m_Integer; |
+ FX_FLOAT m_Float; |
+ }; |
+ } m_Number; |
+ struct { |
+ int m_Len; |
+ char m_Buffer[32]; |
+ } m_Name; |
}; |
static const int kParamBufSize = 16; |
@@ -76,7 +78,7 @@ class CPDF_StreamContentParser { |
static OpCodes InitializeOpCodes(); |
void AddNumberParam(const FX_CHAR* str, int len); |
- void AddObjectParam(CPDF_Object* pObj); |
+ void AddObjectParam(std::unique_ptr<CPDF_Object> pObj); |
void AddNameParam(const FX_CHAR* name, int size); |
int GetNextParamPos(); |
void ClearAllParams(); |