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

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

Issue 2425783002: Revert "Make CPDF_Object containers hold objects via unique pointers." (Closed)
Patch Set: 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_array.cpp ('k') | core/fpdfapi/parser/cpdf_dictionary.h » ('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 980c94d3250dbe6707ce6663b9a78fc53e0eb7cd..e23aa8ecfbd6bc063d11c1be8c70ed17211884ce 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -155,7 +155,7 @@ FX_BOOL CPDF_DataAvail::AreObjectsAvailable(
for (const auto& it : *pDict) {
const CFX_ByteString& key = it.first;
- CPDF_Object* value = it.second.get();
+ CPDF_Object* value = it.second;
if (key != "Parent")
new_obj_array.push_back(value);
}
@@ -493,8 +493,8 @@ FX_BOOL CPDF_DataAvail::CheckPage(DownloadHints* pHints) {
CPDF_Array* pArray = ToArray(pObj);
if (pArray) {
- for (auto& pArrayObj : *pArray) {
- if (CPDF_Reference* pRef = ToReference(pArrayObj.get()))
+ for (CPDF_Object* pArrayObj : *pArray) {
+ if (CPDF_Reference* pRef = ToReference(pArrayObj))
UnavailObjList.Add(pRef->GetRefObjNum());
}
}
@@ -742,7 +742,7 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(DownloadHints* pHints) {
return FALSE;
}
- for (const auto& pArrayObject : *pHintStreamRange) {
+ for (const CPDF_Object* pArrayObject : *pHintStreamRange) {
const CPDF_Number* pNumber = ToNumber(pArrayObject->GetDirect());
if (!pNumber || !pNumber->IsInteger()) {
m_docStatus = PDF_DATAAVAIL_ERROR;
« no previous file with comments | « core/fpdfapi/parser/cpdf_array.cpp ('k') | core/fpdfapi/parser/cpdf_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698