mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-30 01:03:30 +01:00
fix compiler warnings about size_t to int conversion
This commit is contained in:
parent
c08527deb3
commit
f4f6ab5ab1
@ -96,9 +96,9 @@ void SweepContext::InitTriangulation()
|
|||||||
|
|
||||||
void SweepContext::InitEdges(std::vector<Point*> polyline)
|
void SweepContext::InitEdges(std::vector<Point*> polyline)
|
||||||
{
|
{
|
||||||
int num_points = polyline.size();
|
size_t num_points = polyline.size();
|
||||||
for (int i = 0; i < num_points; i++) {
|
for (size_t i = 0; i < num_points; i++) {
|
||||||
int j = i < num_points - 1 ? i + 1 : 0;
|
size_t j = i < num_points - 1 ? i + 1 : 0;
|
||||||
edge_list.push_back(new Edge(*polyline[i], *polyline[j]));
|
edge_list.push_back(new Edge(*polyline[i], *polyline[j]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ void set_tail(Point* p1);
|
|||||||
|
|
||||||
Point* tail();
|
Point* tail();
|
||||||
|
|
||||||
int point_count();
|
size_t point_count();
|
||||||
|
|
||||||
Node& LocateNode(Point& point);
|
Node& LocateNode(Point& point);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ AdvancingFront* front();
|
|||||||
void MeshClean(Triangle& triangle);
|
void MeshClean(Triangle& triangle);
|
||||||
|
|
||||||
std::vector<Triangle*> GetTriangles();
|
std::vector<Triangle*> GetTriangles();
|
||||||
std::list<Triangle*> GetMap();
|
std::list<Triangle*> GetMap();
|
||||||
|
|
||||||
std::vector<Edge*> edge_list;
|
std::vector<Edge*> edge_list;
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ inline AdvancingFront* SweepContext::front()
|
|||||||
return front_;
|
return front_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int SweepContext::point_count()
|
inline size_t SweepContext::point_count()
|
||||||
{
|
{
|
||||||
return points_.size();
|
return points_.size();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user