summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/include
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-21 19:10:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-21 19:10:19 -0700
commitbb577af2f17467a55c04fbff21a8f0ec1016601a (patch)
tree5a5321b1aff1bcc6ee6dc19928aa729a4ddc9a3d /core/fpdfapi/fpdf_parser/include
parent7149abce42b211ad3c0eaa39a340825acd41a1ec (diff)
downloadpdfium-bb577af2f17467a55c04fbff21a8f0ec1016601a.tar.xz
Remove some objnum locals with AddIndirectObject
Also, it's idempotent, so simplify some logic in callers to not care if objnum is zero. The alternate forms are rarely used, using the objnum form makes it clear that SetReferenceFor() can't possibly register the object as a side-effect. Review-Url: https://codereview.chromium.org/2361713002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/include')
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_array.h3
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h5
2 files changed, 0 insertions, 8 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
index 1e8c612710..a63c40cddb 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
@@ -53,9 +53,6 @@ class CPDF_Array : public CPDF_Object {
void AddString(const CFX_ByteString& str);
void AddName(const CFX_ByteString& str);
void AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
- void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) {
- AddReference(pDoc, obj->GetObjNum());
- }
iterator begin() { return m_Objects.begin(); }
iterator end() { return m_Objects.end(); }
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
index 784d49714f..fc69ce2f4b 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
@@ -63,11 +63,6 @@ class CPDF_Dictionary : public CPDF_Object {
void SetReferenceFor(const CFX_ByteString& key,
CPDF_IndirectObjectHolder* pDoc,
uint32_t objnum);
- void SetReferenceFor(const CFX_ByteString& key,
- CPDF_IndirectObjectHolder* pDoc,
- CPDF_Object* obj) {
- SetReferenceFor(key, pDoc, obj->GetObjNum());
- }
void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect);
void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix);
void SetBooleanFor(const CFX_ByteString& key, bool bValue);