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

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

Issue 2498223005: Make CPDF_Array take unique_ptrs (Closed)
Patch Set: nits Created 4 years, 1 month 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_array_unittest.cpp ('k') | core/fpdfapi/parser/cpdf_dictionary.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.cpp
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index c1d17a98ed9fc67d06d7e9e81a63d7cdf5f5e700..6af2da6ff0df5319e279d048de45bf881864d2d4 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -470,15 +470,13 @@ bool CPDF_DataAvail::CheckPage(DownloadHints* pHints) {
CPDF_Array* pArray = ToArray(pObj.get());
if (pArray) {
- for (CPDF_Object* pArrayObj : *pArray) {
- if (CPDF_Reference* pRef = ToReference(pArrayObj))
+ for (const auto& pArrayObj : *pArray) {
+ if (CPDF_Reference* pRef = ToReference(pArrayObj.get()))
UnavailObjList.Add(pRef->GetRefObjNum());
}
}
-
- if (!pObj->IsDictionary()) {
+ if (!pObj->IsDictionary())
continue;
- }
CFX_ByteString type = pObj->GetDict()->GetStringFor("Type");
if (type == "Pages") {
« no previous file with comments | « core/fpdfapi/parser/cpdf_array_unittest.cpp ('k') | core/fpdfapi/parser/cpdf_dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698