for(map<string, Route *>::iterator i=routes.begin(); i!=routes.end(); ++i)
{
+ if(i->second->is_temporary())
+ continue;
+
DataFile::Statement st("route");
st.append(i->first);
i->second->save(st.sub);
{
for(map<string, Route *>::iterator i=routes.begin(); i!=routes.end(); ++i)
{
+ if(i->second->is_temporary())
+ continue;
+
/* We must copy the turnout map, since adding tracks to the route will
(temporarily) mess it up */
const map<unsigned, int> turnouts = i->second->get_turnouts();
while(1)
{
// Traverse the track and get the next one
+ if(track->get_type().get_endpoints().size()<2)
+ break;
unsigned out_ep = track->traverse(ep, trk_path);
Track *next = track->get_links()[out_ep];
if(!next || next == start)