summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-09 16:26:21 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-09 16:26:21 -0800
commit035359cd8ddb555fa33b6133db4fd405e4660712 (patch)
tree89accecac7da250468166168cd502ed7b92c7ce7 /core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
parent0c92bed7ade20fe193dce0a481dad48e1be41622 (diff)
downloadpdfium-035359cd8ddb555fa33b6133db4fd405e4660712.tar.xz
Get rid of most uses of CFX_PtrArray.
I didn't go whole hog and replace these with std::vector, but in the mean time, it is silly to cast a typedef for a template instantiated against void* when we can just instantiate the template against the actual type. The ones that remain are actual heterogeneous arrays with wacky casting. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1518593002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 163b6e9d53..a2d4988f92 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -80,7 +80,7 @@ CPDF_StreamContentParser::CPDF_StreamContentParser(
CPDF_StreamContentParser::~CPDF_StreamContentParser() {
ClearAllParams();
for (int i = 0; i < m_StateStack.GetSize(); ++i) {
- delete (CPDF_AllStates*)m_StateStack[i];
+ delete m_StateStack[i];
}
FX_Free(m_pPathPoints);
if (m_pLastImageDict) {
@@ -819,12 +819,10 @@ void CPDF_StreamContentParser::Handle_EndText() {
}
if (m_pCurStates->m_TextState.GetObject()->m_TextMode < 4) {
for (int i = 0; i < count; i++) {
- CPDF_TextObject* pText = (CPDF_TextObject*)m_ClipTextList.GetAt(i);
- delete pText;
+ delete m_ClipTextList.GetAt(i);
}
} else {
- m_pCurStates->m_ClipPath.AppendTexts(
- (CPDF_TextObject**)m_ClipTextList.GetData(), count);
+ m_pCurStates->m_ClipPath.AppendTexts(m_ClipTextList.GetData(), count);
}
m_ClipTextList.RemoveAll();
}
@@ -950,7 +948,7 @@ void CPDF_StreamContentParser::Handle_RestoreGraphState() {
if (size == 0) {
return;
}
- CPDF_AllStates* pStates = (CPDF_AllStates*)m_StateStack.GetAt(size - 1);
+ CPDF_AllStates* pStates = m_StateStack.GetAt(size - 1);
m_pCurStates->Copy(*pStates);
delete pStates;
m_StateStack.RemoveAt(size - 1);