Use size_t for indices in cfx_path.h methods.
These one-liners in the header just use the argument to directly
index a std::vector, so they already can handle these cases without
additional complications.
Change-Id: I29f99519cb009e2146d9edd5c5f3463144f442b9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/88510
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/cfx_path.h b/core/fxge/cfx_path.h
index 344b382..357df59 100644
--- a/core/fxge/cfx_path.h
+++ b/core/fxge/cfx_path.h
@@ -42,12 +42,11 @@
void Clear();
- Point::Type GetType(int index) const { return m_Points[index].m_Type; }
- bool IsClosingFigure(int index) const {
+ Point::Type GetType(size_t index) const { return m_Points[index].m_Type; }
+ bool IsClosingFigure(size_t index) const {
return m_Points[index].m_CloseFigure;
}
-
- CFX_PointF GetPoint(int index) const { return m_Points[index].m_Point; }
+ CFX_PointF GetPoint(size_t index) const { return m_Points[index].m_Point; }
const std::vector<Point>& GetPoints() const { return m_Points; }
std::vector<Point>& GetPoints() { return m_Points; }