mirror of https://github.com/CGAL/cgal
int -> size_t
This commit is contained in:
parent
ca2ee880f1
commit
0960df404b
|
|
@ -313,19 +313,19 @@ class Polygon_2 {
|
|||
// Random access methods
|
||||
//--------------------------------------------------------
|
||||
|
||||
const Point_2& vertex(int i) const
|
||||
const Point_2& vertex(std::size_t i) const
|
||||
{ return *(d_container.begin() + i); }
|
||||
|
||||
// Point_2& vertex(int i)
|
||||
// Point_2& vertex(std::size_t i)
|
||||
// { return *(d_container.begin() + i); }
|
||||
|
||||
const Point_2& operator[](int i) const
|
||||
const Point_2& operator[](std::size_t i) const
|
||||
{ return vertex(i); }
|
||||
|
||||
// Point_2& operator[](int i)
|
||||
// Point_2& operator[](std::size_t i)
|
||||
// { return vertex(i); }
|
||||
|
||||
Segment_2 edge(int i) const
|
||||
Segment_2 edge(std::size_t i) const
|
||||
{ return *(edges_begin() + i); }
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ void test_access_functions(VectorPolygon& p)
|
|||
cout << "p.is_empty() = " << (p.is_empty() ? "true" : "false") << endl;
|
||||
|
||||
// test random access methods
|
||||
for (int i=0; i<p.size(); i++) {
|
||||
for (std::size_t i=0; i<p.size(); i++) {
|
||||
cout << "vertex " << i << " = " << p.vertex(i) << endl;
|
||||
cout << "edge " << i << " = " << p.edge(i) << endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#define CGAL_POLYGON_DEBUG 1
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
#ifdef CGAL_USE_GMP
|
||||
|
|
|
|||
Loading…
Reference in New Issue