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