Revert "Added missing check to e->to->prevedge"

This reverts commit 4077acd583.
This commit is contained in:
thorkill 2015-07-21 19:39:08 +02:00
parent 512c64980a
commit 0842bc0ca5

View file

@ -196,7 +196,7 @@ static void sssp_bfs(void) {
// Only update nexthop if it doesn't increase the path length // Only update nexthop if it doesn't increase the path length
if(!e->to->status.visited || (e->to->distance == n->distance + 1 && (e->to->prevedge && e->weight <= e->to->prevedge->weight))) if(!e->to->status.visited || (e->to->distance == n->distance + 1 && e->weight <= e->to->prevedge->weight))
e->to->nexthop = (n->nexthop == myself) ? e->to : n->nexthop; e->to->nexthop = (n->nexthop == myself) ? e->to : n->nexthop;
e->to->status.visited = true; e->to->status.visited = true;