- const TrackType &type = lowest.track->get_type();
- const vector<Endpoint> &eps = type.get_endpoints();
- const vector<Track *> &links = lowest.track->get_links();
- for(unsigned i=0; i<eps.size(); ++i)
- {
- if(i==lowest.ep || !links[i])
- continue;
-
- unsigned link_ep = links[i]->get_endpoint_by_link(*lowest.track);
- if(track_nodes.count(Key(links[i], link_ep)))
- continue;
+ unsigned paths = lowest.track->get_type().get_endpoints()[lowest.track.entry()].paths;
+ for(unsigned i=0; paths>>i; ++i)
+ if(paths&(1<<i))
+ {
+ TrackIter next = lowest.track.next(i);
+ if(!next)
+ continue;