summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.h')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h
index 1ed2aaa4de..dfb5230809 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();