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

Unified Diff: core/fpdfapi/parser/cpdf_parser.cpp

Issue 2411703003: Get rid of CFX_ArrayTemplate<CPDF_Object*> (Closed)
Patch Set: nit Created 4 years, 2 months 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/fpdfapi/parser/cpdf_parser.h ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_parser.cpp
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index f4cde0c198e2538d014246da7bea689181591e37..c29ae18da2ac267353c23fde29162d7e669b6456 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -72,9 +72,8 @@ CPDF_Parser::~CPDF_Parser() {
m_pSyntax->m_pFileAccess = nullptr;
}
- int32_t iLen = m_Trailers.GetSize();
- for (int32_t i = 0; i < iLen; ++i) {
- if (CPDF_Dictionary* trailer = m_Trailers.GetAt(i))
+ for (CPDF_Dictionary* trailer : m_Trailers) {
+ if (trailer)
trailer->Release();
}
@@ -368,7 +367,7 @@ FX_BOOL CPDF_Parser::LoadAllCrossRefV4(FX_FILESIZE xrefpos) {
// SLOW ...
XRefStreamList.insert(XRefStreamList.begin(),
pDict->GetIntegerFor("XRefStm"));
- m_Trailers.Add(pDict.release());
+ m_Trailers.push_back(pDict.release());
}
for (size_t i = 0; i < CrossRefList.size(); ++i) {
@@ -423,7 +422,7 @@ FX_BOOL CPDF_Parser::LoadLinearizedAllCrossRefV4(FX_FILESIZE xrefpos,
// SLOW ...
XRefStreamList.insert(XRefStreamList.begin(),
pDict->GetIntegerFor("XRefStm"));
- m_Trailers.Add(pDict.release());
+ m_Trailers.push_back(pDict.release());
}
for (size_t i = 1; i < CrossRefList.size(); ++i) {
@@ -992,7 +991,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, FX_BOOL bMainXRef) {
for (auto& it : m_ObjectInfo)
it.second.type = 0;
} else {
- m_Trailers.Add(pNewTrailer);
+ m_Trailers.push_back(pNewTrailer);
}
std::vector<std::pair<int32_t, int32_t>> arrIndex;
« no previous file with comments | « core/fpdfapi/parser/cpdf_parser.h ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698