diff options
author | thestig <thestig@chromium.org> | 2016-05-19 14:36:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-19 14:36:00 -0700 |
commit | 80f25a5a8135933a405349ffc798d13273b3d690 (patch) | |
tree | db15a1e0c751f6fc0a648a991d744bc14e7bfadd /core/fpdfapi/fpdf_page/cpdf_clippathdata.h | |
parent | c7600f99490f83e544e37feb77d3b9e8428b0f68 (diff) | |
download | pdfium-80f25a5a8135933a405349ffc798d13273b3d690.tar.xz |
Fix leak in CPDF_StreamContentParser::AddTextObject().
... by using STL containers in more places.
Remove dead / duplicate code as well.
BUG=603904
Review-Url: https://codereview.chromium.org/1998583002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_clippathdata.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_clippathdata.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_clippathdata.h b/core/fpdfapi/fpdf_page/cpdf_clippathdata.h index 05a247f753..70e2b1b096 100644 --- a/core/fpdfapi/fpdf_page/cpdf_clippathdata.h +++ b/core/fpdfapi/fpdf_page/cpdf_clippathdata.h @@ -9,22 +9,22 @@ #include <stdint.h> +#include <memory> +#include <utility> +#include <vector> + class CPDF_Path; class CPDF_TextObject; class CPDF_ClipPathData { public: + using PathAndTypeData = std::pair<CPDF_Path, uint8_t>; CPDF_ClipPathData(); CPDF_ClipPathData(const CPDF_ClipPathData&); ~CPDF_ClipPathData(); - void SetCount(int path_count, int text_count); - - int m_PathCount; - CPDF_Path* m_pPathList; - uint8_t* m_pTypeList; - int m_TextCount; - CPDF_TextObject** m_pTextList; + std::vector<PathAndTypeData> m_PathAndTypeList; + std::vector<std::unique_ptr<CPDF_TextObject>> m_TextList; }; #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ |