diff --git a/poly2tri/common/shapes.cc b/poly2tri/common/shapes.cc index 672e9d4..77bafa1 100644 --- a/poly2tri/common/shapes.cc +++ b/poly2tri/common/shapes.cc @@ -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); } diff --git a/poly2tri/sweep/advancing_front.cc b/poly2tri/sweep/advancing_front.cc index 6504245..019df4a 100644 --- a/poly2tri/sweep/advancing_front.cc +++ b/poly2tri/sweep/advancing_front.cc @@ -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_; } diff --git a/poly2tri/sweep/advancing_front.h b/poly2tri/sweep/advancing_front.h index abd2b5a..bab73d4 100644 --- a/poly2tri/sweep/advancing_front.h +++ b/poly2tri/sweep/advancing_front.h @@ -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) { } diff --git a/poly2tri/sweep/sweep.cc b/poly2tri/sweep/sweep.cc index 12a402f..3682c30 100644 --- a/poly2tri/sweep/sweep.cc +++ b/poly2tri/sweep/sweep.cc @@ -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); } } diff --git a/poly2tri/sweep/sweep_context.cc b/poly2tri/sweep/sweep_context.cc index 13fb6e9..c9dd5a8 100644 --- a/poly2tri/sweep/sweep_context.cc +++ b/poly2tri/sweep/sweep_context.cc @@ -47,7 +47,7 @@ SweepContext::SweepContext(std::vector polyline) void SweepContext::AddHole(std::vector 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 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]; }