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