Remove check for undefined behaviour

Triangle::NeighborAcross returns a reference, which must refer to a valid
object whose address cannot be 0. Thus, this test is nonsensical.
This commit is contained in:
Simon Richter 2016-09-27 19:33:49 +02:00 committed by Wayne Stambaugh
parent 7a5f72c948
commit 04e21d5c8f
1 changed files with 0 additions and 16 deletions

View File

@ -882,14 +882,6 @@ void Sweep::FlipEdgeEvent( SweepContext& tcx, Point& ep, Point& eq, Triangle* t,
Triangle& ot = t->NeighborAcross( p );
Point& op = *ot.OppositePoint( *t, p );
if( &ot == NULL )
{
// If we want to integrate the fillEdgeEvent do it here
// With current implementation we should never get here
// throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
assert( 0 );
}
if( InScanArea( p, *t->PointCCW( p ), *t->PointCW( p ), op ) )
{
// Lets rotate shared edge one vertex CW
@ -984,14 +976,6 @@ void Sweep::FlipScanEdgeEvent( SweepContext& tcx, Point& ep, Point& eq, Triangle
Triangle& ot = t.NeighborAcross( p );
Point& op = *ot.OppositePoint( t, p );
if( &t.NeighborAcross( p ) == NULL )
{
// If we want to integrate the fillEdgeEvent do it here
// With current implementation we should never get here
// throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
assert( 0 );
}
if( InScanArea( eq, *flip_triangle.PointCCW( eq ), *flip_triangle.PointCW( eq ), op ) )
{
// flip with new edge op->eq