summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentmark.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-11-22 20:05:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-22 20:05:32 +0000
commita27e55e1c8c04fa85e2132e98e92b42d1a084b1f (patch)
tree615b1f5d4aa301e37fde3886b3ff1a8d9b2f732c /core/fpdfapi/page/cpdf_contentmark.cpp
parente6dba0dcc2c399e92b2ed7029a5241726f38938f (diff)
downloadpdfium-a27e55e1c8c04fa85e2132e98e92b42d1a084b1f.tar.xz
Change CPDF_ContentMark to return size_t for counts.
Change-Id: I45468fa7944290fbbe3d2e67f884164ae8d84160 Reviewed-on: https://pdfium-review.googlesource.com/19171 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmark.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentmark.cpp11
1 files changed, 5 insertions, 6 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];
}