summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-11 13:42:12 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-11 13:42:12 -0700
commitab36e73c8c5409fa262d4fa2faffe65c8804a792 (patch)
tree6a454e2cabb89698f2b05fed0e301eba414b2621 /core/fpdfapi/parser/cpdf_array.cpp
parenta91b8d395ac8f6aed38cccfda1f38de11dd45bdd (diff)
downloadpdfium-ab36e73c8c5409fa262d4fa2faffe65c8804a792.tar.xz
Add CPDF_Object::IsInline()
Prevent having to remember what an object number of 0 implies. Review-Url: https://codereview.chromium.org/2412673002
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index 0d0c02f28d..1aec3e06f3 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -161,7 +161,7 @@ void CPDF_Array::ConvertToIndirectObjectAt(size_t i,
void CPDF_Array::SetAt(size_t i, CPDF_Object* pObj) {
ASSERT(IsArray());
- CHECK(!pObj || pObj->GetObjNum() == 0);
+ CHECK(!pObj || pObj->IsInline());
if (i >= m_Objects.size()) {
ASSERT(false);
return;
@@ -174,7 +174,7 @@ void CPDF_Array::SetAt(size_t i, CPDF_Object* pObj) {
void CPDF_Array::InsertAt(size_t index, CPDF_Object* pObj) {
ASSERT(IsArray());
- CHECK(!pObj || pObj->GetObjNum() == 0);
+ CHECK(!pObj || pObj->IsInline());
if (index >= m_Objects.size()) {
// Allocate space first.
m_Objects.resize(index + 1, nullptr);
@@ -187,7 +187,7 @@ void CPDF_Array::InsertAt(size_t index, CPDF_Object* pObj) {
void CPDF_Array::Add(CPDF_Object* pObj) {
ASSERT(IsArray());
- CHECK(!pObj || pObj->GetObjNum() == 0);
+ CHECK(!pObj || pObj->IsInline());
m_Objects.push_back(pObj);
}