Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1513103002: Merge to XFA: Get rid of most uses of CFX_PtrArray. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_page/pageint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 163b6e9d536eb93cfe1845808e8105b026fece62..a2d4988f9264765f18178ad05b39a76837c06be2 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);
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698