diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-10-14 17:45:56 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-10-14 17:45:56 -0700 |
commit | c25a4219431c90a95233a08f25eecc921abbf3ed (patch) | |
tree | bd2ad923d527440785c19623fe2d19cc1a70a92d /core/fpdfapi/parser/cpdf_array.cpp | |
parent | 62f367348ff8ff1e64c6f52c1ee5f77c3a89edc1 (diff) | |
download | pdfium-c25a4219431c90a95233a08f25eecc921abbf3ed.tar.xz |
Revert "Update CPDF_IndirectObjectHolder APIs for unique objects."
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920.
TBR=thestig@chromium.org,weili@chromium.org
Review URL: https://codereview.chromium.org/2424533003 .
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_array.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp index db3b18be3e..807f62d7f3 100644 --- a/core/fpdfapi/parser/cpdf_array.cpp +++ b/core/fpdfapi/parser/cpdf_array.cpp @@ -152,9 +152,8 @@ void CPDF_Array::ConvertToIndirectObjectAt(size_t i, if (!m_Objects[i] || m_Objects[i]->IsReference()) return; - CPDF_Object* pUnowned = pHolder->AddIndirectObject(std::move(m_Objects[i])); - m_Objects[i] = - UniqueObject(new CPDF_Reference(pHolder, pUnowned->GetObjNum())); + uint32_t dwObjNum = pHolder->AddIndirectObject(m_Objects[i].release()); + m_Objects[i] = UniqueObject(new CPDF_Reference(pHolder, dwObjNum)); } void CPDF_Array::SetAt(size_t i, CPDF_Object* pObj) { @@ -206,8 +205,3 @@ void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum) { Add(new CPDF_Reference(pDoc, objnum)); } - -void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, - const CPDF_Object* pObj) { - AddReference(pDoc, pObj->GetObjNum()); -} |