summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/cpdf_array.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-29 14:51:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-29 14:51:50 -0700
commitbd56755ba86f2d87e24a3cee5cb92aa14a81bb27 (patch)
treefb4692dc44cb549b7149be080ec26f4b7cd7b086 /core/fpdfapi/fpdf_parser/cpdf_array.cpp
parent7f432a1c87014d6673ee69ff0ffa3724f237acf4 (diff)
downloadpdfium-bd56755ba86f2d87e24a3cee5cb92aa14a81bb27.tar.xz
Rename GetElementValue() to GetDirectObject{By,At}().
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_array.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_array.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_array.cpp b/core/fpdfapi/fpdf_parser/cpdf_array.cpp
index 544469916b..7ea2734745 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_array.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_array.cpp
@@ -76,13 +76,13 @@ CFX_Matrix CPDF_Array::GetMatrix() {
return matrix;
}
-CPDF_Object* CPDF_Array::GetElement(uint32_t i) const {
+CPDF_Object* CPDF_Array::GetObjectAt(uint32_t i) const {
if (i >= (uint32_t)m_Objects.GetSize())
return nullptr;
return m_Objects.GetAt(i);
}
-CPDF_Object* CPDF_Array::GetElementValue(uint32_t i) const {
+CPDF_Object* CPDF_Array::GetDirectObjectAt(uint32_t i) const {
if (i >= (uint32_t)m_Objects.GetSize())
return nullptr;
return m_Objects.GetAt(i)->GetDirect();
@@ -113,7 +113,7 @@ FX_FLOAT CPDF_Array::GetNumberAt(uint32_t i) const {
}
CPDF_Dictionary* CPDF_Array::GetDictAt(uint32_t i) const {
- CPDF_Object* p = GetElementValue(i);
+ CPDF_Object* p = GetDirectObjectAt(i);
if (!p)
return NULL;
if (CPDF_Dictionary* pDict = p->AsDictionary())
@@ -124,11 +124,11 @@ CPDF_Dictionary* CPDF_Array::GetDictAt(uint32_t i) const {
}
CPDF_Stream* CPDF_Array::GetStreamAt(uint32_t i) const {
- return ToStream(GetElementValue(i));
+ return ToStream(GetDirectObjectAt(i));
}
CPDF_Array* CPDF_Array::GetArrayAt(uint32_t i) const {
- return ToArray(GetElementValue(i));
+ return ToArray(GetDirectObjectAt(i));
}
void CPDF_Array::RemoveAt(uint32_t i, int nCount) {