mirror of
https://github.com/jhasse/poly2tri.git
synced 2025-01-03 16:33:31 +01:00
fixed compiler warnings
This commit is contained in:
parent
973280c769
commit
544aec554c
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||
* http://code.google.com/p/poly2tri/
|
||||
*
|
||||
@ -96,14 +96,14 @@ void Triangle::ClearNeighbor(Triangle *triangle )
|
||||
}
|
||||
else if( neighbors_[1] == triangle )
|
||||
{
|
||||
neighbors_[1] = NULL;
|
||||
neighbors_[1] = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
neighbors_[2] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Triangle::ClearNeighbors()
|
||||
{
|
||||
neighbors_[0] = NULL;
|
||||
@ -119,10 +119,6 @@ void Triangle::ClearDelunayEdges()
|
||||
Point* Triangle::OppositePoint(Triangle& t, Point& p)
|
||||
{
|
||||
Point *cw = t.PointCW(p);
|
||||
double x = cw->x;
|
||||
double y = cw->y;
|
||||
x = p.x;
|
||||
y = p.y;
|
||||
return PointCW(*cw);
|
||||
}
|
||||
|
||||
@ -164,6 +160,7 @@ int Triangle::Index(const Point* p)
|
||||
return 2;
|
||||
}
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Triangle::EdgeIndex(const Point* p1, const Point* p2)
|
||||
@ -223,6 +220,7 @@ Point* Triangle::PointCW(Point& point)
|
||||
return points_[1];
|
||||
}
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// The point counter-clockwise to given point
|
||||
@ -236,6 +234,7 @@ Point* Triangle::PointCCW(Point& point)
|
||||
return points_[0];
|
||||
}
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// The neighbor clockwise to given point
|
||||
|
@ -765,10 +765,8 @@ Point& Sweep::NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op)
|
||||
} else if (o2d == CCW) {
|
||||
// Left
|
||||
return *ot.PointCW(op);
|
||||
} else{
|
||||
//throw new RuntimeException("[Unsupported] Opposing point on constrained edge");
|
||||
assert(0);
|
||||
}
|
||||
throw std::runtime_error("[Unsupported] Opposing point on constrained edge");
|
||||
}
|
||||
|
||||
void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle,
|
||||
@ -803,7 +801,7 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
|
||||
Sweep::~Sweep() {
|
||||
|
||||
// Clean up memory
|
||||
for(int i = 0; i < nodes_.size(); i++) {
|
||||
for(size_t i = 0; i < nodes_.size(); i++) {
|
||||
delete nodes_[i];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user