mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-05 22:09:52 +01:00
fixed a few gcc warnings
This commit is contained in:
parent
b5c5cbd82f
commit
56510a42f7
@ -123,7 +123,6 @@ Point* Triangle::OppositePoint(Triangle& t, Point& p)
|
||||
double y = cw->y;
|
||||
x = p.x;
|
||||
y = p.y;
|
||||
Point* ham = PointCW(*cw);
|
||||
return PointCW(*cw);
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ Node* AdvancingFront::LocateNode(const double& x)
|
||||
|
||||
Node* AdvancingFront::FindSearchNode(const double& x)
|
||||
{
|
||||
(void)x; // suppress compiler warnings "unused parameter 'x'"
|
||||
// TODO: implement BST index
|
||||
return search_node_;
|
||||
}
|
||||
|
@ -48,12 +48,11 @@ struct Node {
|
||||
|
||||
double value;
|
||||
|
||||
Node(Point& p) : point(&p), triangle(NULL), value(p.x), next(NULL), prev(NULL)
|
||||
Node(Point& p) : point(&p), triangle(NULL), next(NULL), prev(NULL), value(p.x)
|
||||
{
|
||||
}
|
||||
|
||||
Node(Point& p, Triangle& t) : point(&p), triangle(&t), value(p.x),
|
||||
next(NULL), prev(NULL)
|
||||
Node(Point& p, Triangle& t) : point(&p), triangle(&t), next(NULL), prev(NULL), value(p.x)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ void Sweep::SweepPoints(SweepContext& tcx)
|
||||
for (int i = 1; i < tcx.point_count(); i++) {
|
||||
Point& point = *tcx.GetPoint(i);
|
||||
Node* node = &PointEvent(tcx, point);
|
||||
for (int i = 0; i < point.edge_list.size(); i++) {
|
||||
for (unsigned int i = 0; i < point.edge_list.size(); i++) {
|
||||
EdgeEvent(tcx, point.edge_list[i], node);
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ SweepContext::SweepContext(std::vector<Point*> polyline)
|
||||
void SweepContext::AddHole(std::vector<Point*> polyline)
|
||||
{
|
||||
InitEdges(polyline);
|
||||
for(int i = 0; i < polyline.size(); i++) {
|
||||
for(unsigned int i = 0; i < polyline.size(); i++) {
|
||||
points_.push_back(polyline[i]);
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,7 @@ void SweepContext::InitTriangulation()
|
||||
double ymax(points_[0]->y), ymin(points_[0]->y);
|
||||
|
||||
// Calculate bounds.
|
||||
for (int i = 0; i < points_.size(); i++) {
|
||||
for (unsigned int i = 0; i < points_.size(); i++) {
|
||||
Point& p = *points_[i];
|
||||
if (p.x > xmax)
|
||||
xmax = p.x;
|
||||
@ -122,6 +122,7 @@ Node& SweepContext::LocateNode(Point& point)
|
||||
void SweepContext::CreateAdvancingFront(std::vector<Node*> nodes)
|
||||
{
|
||||
|
||||
(void) nodes;
|
||||
// Initial triangle
|
||||
Triangle* triangle = new Triangle(*points_[0], *tail_, *head_);
|
||||
|
||||
@ -192,7 +193,7 @@ SweepContext::~SweepContext()
|
||||
delete ptr;
|
||||
}
|
||||
|
||||
for(int i = 0; i < edge_list.size(); i++) {
|
||||
for(unsigned int i = 0; i < edge_list.size(); i++) {
|
||||
delete edge_list[i];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user