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

Unified Diff: core/fpdfapi/parser/cpdf_data_avail.h

Issue 2598473002: Use vector of unique_ptrs for page node children. (Closed)
Patch Set: Avoid appearance of infinite loop Created 4 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 | « no previous file | core/fpdfapi/parser/cpdf_data_avail.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_data_avail.h
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h
index 1ced2a213371b949c59a90938fae2ba1c6f04aac..42013e93ec7776babff0d5f38fd137b8c7c28239 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.h
+++ b/core/fpdfapi/parser/cpdf_data_avail.h
@@ -121,7 +121,7 @@ class CPDF_DataAvail final {
PDF_PAGENODE_TYPE m_type;
uint32_t m_dwPageNo;
- CFX_ArrayTemplate<PageNode*> m_childNode;
+ std::vector<std::unique_ptr<PageNode>> m_ChildNodes;
};
static const int kMaxDataAvailRecursionDepth = 64;
@@ -179,14 +179,14 @@ class CPDF_DataAvail final {
bool CheckPage(uint32_t dwPage, DownloadHints* pHints);
bool LoadDocPages(DownloadHints* pHints);
bool LoadDocPage(uint32_t dwPage, DownloadHints* pHints);
- bool CheckPageNode(PageNode& pageNodes,
+ bool CheckPageNode(const PageNode& pageNode,
int32_t iPage,
int32_t& iCount,
DownloadHints* pHints,
int level);
- bool CheckUnkownPageNode(uint32_t dwPageNo,
- PageNode* pPageNode,
- DownloadHints* pHints);
+ bool CheckUnknownPageNode(uint32_t dwPageNo,
+ PageNode* pPageNode,
+ DownloadHints* pHints);
bool CheckArrayPageNode(uint32_t dwPageNo,
PageNode* pPageNode,
DownloadHints* pHints);
@@ -247,7 +247,7 @@ class CPDF_DataAvail final {
FX_FILESIZE m_dwPrevXRefOffset;
bool m_bTotalLoadPageTree;
bool m_bCurPageDictLoadOK;
- PageNode m_pageNodes;
+ PageNode m_PageNode;
std::set<uint32_t> m_pageMapCheckState;
std::set<uint32_t> m_pagesLoadState;
std::unique_ptr<CPDF_HintTables> m_pHintTables;
« no previous file with comments | « no previous file | core/fpdfapi/parser/cpdf_data_avail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698