diff options
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/page/cpdf_contentmark.cpp | 11 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_contentmark.h | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmark.cpp b/core/fpdfapi/page/cpdf_contentmark.cpp index b28d4eaada..1d70edeb51 100644 --- a/core/fpdfapi/page/cpdf_contentmark.cpp +++ b/core/fpdfapi/page/cpdf_contentmark.cpp @@ -9,7 +9,6 @@ #include <utility> #include "core/fpdfapi/parser/cpdf_dictionary.h" -#include "third_party/base/stl_util.h" CPDF_ContentMark::CPDF_ContentMark() {} @@ -18,11 +17,11 @@ CPDF_ContentMark::CPDF_ContentMark(const CPDF_ContentMark& that) CPDF_ContentMark::~CPDF_ContentMark() {} -int CPDF_ContentMark::CountItems() const { +size_t CPDF_ContentMark::CountItems() const { return m_Ref.GetObject()->CountItems(); } -const CPDF_ContentMarkItem& CPDF_ContentMark::GetItem(int i) const { +const CPDF_ContentMarkItem& CPDF_ContentMark::GetItem(size_t i) const { return m_Ref.GetObject()->GetItem(i); } @@ -45,12 +44,12 @@ CPDF_ContentMark::MarkData::MarkData(const MarkData& src) CPDF_ContentMark::MarkData::~MarkData() {} -int CPDF_ContentMark::MarkData::CountItems() const { - return pdfium::CollectionSize<int>(m_Marks); +size_t CPDF_ContentMark::MarkData::CountItems() const { + return m_Marks.size(); } const CPDF_ContentMarkItem& CPDF_ContentMark::MarkData::GetItem( - int index) const { + size_t index) const { return m_Marks[index]; } diff --git a/core/fpdfapi/page/cpdf_contentmark.h b/core/fpdfapi/page/cpdf_contentmark.h index f9a891017e..cb22737ca9 100644 --- a/core/fpdfapi/page/cpdf_contentmark.h +++ b/core/fpdfapi/page/cpdf_contentmark.h @@ -21,8 +21,8 @@ class CPDF_ContentMark { CPDF_ContentMark(const CPDF_ContentMark& that); ~CPDF_ContentMark(); - int CountItems() const; - const CPDF_ContentMarkItem& GetItem(int i) const; + size_t CountItems() const; + const CPDF_ContentMarkItem& GetItem(size_t i) const; void AddMark(const ByteString& name, CPDF_Dictionary* pDict, bool bDirect); void DeleteLastMark(); @@ -36,8 +36,8 @@ class CPDF_ContentMark { MarkData(const MarkData& src); ~MarkData(); - int CountItems() const; - const CPDF_ContentMarkItem& GetItem(int index) const; + size_t CountItems() const; + const CPDF_ContentMarkItem& GetItem(size_t index) const; void AddMark(const ByteString& name, CPDF_Dictionary* pDict, |