-/* $Id$
-
-This file is part of R²C²
-Copyright © 2007-2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#include <queue>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
#include "layout.h"
#include "route.h"
#include "track.h"
#include "trackiter.h"
#include "tracktype.h"
+#include "zone.h"
using namespace std;
using namespace Msp;
const TrackType::Endpoint &ep2 = tlinks[j]->get_type().get_endpoint(tlinks[j]->get_endpoint_by_link(**i));
path = get_turnout(tid2);
// Ignore a linked turnout with some other path set
- if(path>0 && !(ep2.paths&(1<<path)))
+ if(path>=0 && !(ep2.paths&(1<<path)))
continue;
}
return create_route(from, TrackInSet(to.get_tracks()));
}
+Route *Route::find(const TrackIter &from, const Zone &to)
+{
+ return create_route(from, TrackInSet(to.get_tracks()));
+}
+
Route *Route::find(const TrackIter &from, const set<Track *> &to)
{
return create_route(from, TrackInSet(to));