summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_clippathdata.h
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-19 14:36:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 14:36:00 -0700
commit80f25a5a8135933a405349ffc798d13273b3d690 (patch)
treedb15a1e0c751f6fc0a648a991d744bc14e7bfadd /core/fpdfapi/fpdf_page/cpdf_clippathdata.h
parentc7600f99490f83e544e37feb77d3b9e8428b0f68 (diff)
downloadpdfium-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.h14
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_