Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Unified Diff: core/fpdfapi/fpdf_parser/include/cpdf_array.h

Issue 1878803002: Add iterators and unit tests for CPDF_Array class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Comment change Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/include/cpdf_array.h
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
index 506a6bc338b20000b4df4d57263fb361ce6d6804..c6635104db35aa51e0f89ce3fc9dc8e96d95f211 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
@@ -16,6 +16,9 @@
class CPDF_Array : public CPDF_Object {
public:
+ using iterator = std::vector<CPDF_Object*>::iterator;
+ using const_iterator = std::vector<CPDF_Object*>::const_iterator;
+
CPDF_Array();
// CPDF_Object.
@@ -58,6 +61,11 @@ class CPDF_Array : public CPDF_Object {
AddReference(pDoc, obj->GetObjNum());
}
+ iterator begin() { return m_Objects.begin(); }
+ iterator end() { return m_Objects.end(); }
+ const_iterator begin() const { return m_Objects.begin(); }
+ const_iterator end() const { return m_Objects.end(); }
+
protected:
~CPDF_Array() override;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698