diff options
author | jaepark <jaepark@google.com> | 2016-08-08 15:45:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-08 15:45:58 -0700 |
commit | 727da4f329956406b936ba9c0bc49ab2d32db67e (patch) | |
tree | 4674c2a886b49b583232df7dcd52989b5328bf33 /core/fpdfapi/fpdf_parser/include | |
parent | e1e7bd037538c6b31537fc0e3e01c508dab68132 (diff) | |
download | pdfium-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.h | 1 |
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; |