summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorjaepark <jaepark@google.com>2016-08-08 15:45:58 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-08 15:45:58 -0700
commit727da4f329956406b936ba9c0bc49ab2d32db67e (patch)
tree4674c2a886b49b583232df7dcd52989b5328bf33 /core/fpdfapi/fpdf_page
parente1e7bd037538c6b31537fc0e3e01c508dab68132 (diff)
downloadpdfium-727da4f329956406b936ba9c0bc49ab2d32db67e.tar.xz
Add CPDF_Array::IsEmpty().
Using IsEmpty() is more readable than using GetCount() == 0. Review-Url: https://codereview.chromium.org/2226113002
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_colorspace.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp
index 9d3aeb2adc..759d0f37b5 100644
--- a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp
@@ -355,7 +355,7 @@ CPDF_ColorSpace* CPDF_ColorSpace::Load(CPDF_Document* pDoc, CPDF_Object* pObj) {
}
CPDF_Array* pArray = pObj->AsArray();
- if (!pArray || pArray->GetCount() == 0)
+ if (!pArray || pArray->IsEmpty())
return nullptr;
CPDF_Object* pFamilyObj = pArray->GetDirectObjectAt(0);
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 059679a8cd..f8d7575318 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -275,7 +275,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceImpl(
}
CPDF_Array* pArray = pCSObj->AsArray();
- if (!pArray || pArray->GetCount() == 0)
+ if (!pArray || pArray->IsEmpty())
return nullptr;
if (pArray->GetCount() == 1) {