summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_dictionary.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
committerTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
commitc25a4219431c90a95233a08f25eecc921abbf3ed (patch)
treebd2ad923d527440785c19623fe2d19cc1a70a92d /core/fpdfapi/parser/cpdf_dictionary.cpp
parent62f367348ff8ff1e64c6f52c1ee5f77c3a89edc1 (diff)
downloadpdfium-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_dictionary.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 0f03947ebd..435eee7248 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -188,8 +188,8 @@ void CPDF_Dictionary::ConvertToIndirectObjectFor(
if (it == m_Map.end() || it->second->IsReference())
return;
- CPDF_Object* pObj = pHolder->AddIndirectObject(std::move(it->second));
- it->second = UniqueReference(new CPDF_Reference(pHolder, pObj->GetObjNum()));
+ uint32_t objnum = pHolder->AddIndirectObject(it->second.release());
+ it->second = UniqueReference(new CPDF_Reference(pHolder, objnum));
}
void CPDF_Dictionary::RemoveFor(const CFX_ByteString& key) {
@@ -229,12 +229,6 @@ void CPDF_Dictionary::SetReferenceFor(const CFX_ByteString& key,
SetFor(key, new CPDF_Reference(pDoc, objnum));
}
-void CPDF_Dictionary::SetReferenceFor(const CFX_ByteString& key,
- CPDF_IndirectObjectHolder* pDoc,
- const CPDF_Object* pObj) {
- SetReferenceFor(key, pDoc, pObj->GetObjNum());
-}
-
void CPDF_Dictionary::SetNumberFor(const CFX_ByteString& key, FX_FLOAT f) {
SetFor(key, new CPDF_Number(f));
}