From f52c0c1c0dd2d3722b3dfa2c7f722c4eac32087e Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Tue, 27 Jan 2015 02:04:39 +0100 Subject: [PATCH] Remove unnecessary NULL check --- poly2tri/sweep/sweep.cc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/poly2tri/sweep/sweep.cc b/poly2tri/sweep/sweep.cc index 8d2b576..e31ffde 100644 --- a/poly2tri/sweep/sweep.cc +++ b/poly2tri/sweep/sweep.cc @@ -699,13 +699,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 RotateTrianglePair(*t, p, ot, op); @@ -772,13 +765,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 FlipEdgeEvent(tcx, eq, op, &ot, op);