summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/include
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_parser/include
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_parser/include')
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_array.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
index 0629046d9e..9bb99da053 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
@@ -28,6 +28,7 @@ class CPDF_Array : public CPDF_Object {
CPDF_Array* AsArray() override;
const CPDF_Array* AsArray() const override;
+ bool IsEmpty() const { return m_Objects.empty(); }
size_t GetCount() const { return m_Objects.size(); }
CPDF_Object* GetObjectAt(size_t index) const;
CPDF_Object* GetDirectObjectAt(size_t index) const;