X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.cpp;h=10227222daac98b38956c14975d0a334ad2cc3ab;hb=581267f875f4ad32abd44dab6cd813bc871f55c5;hp=a45675c90c146e078427bb754848b6b907d806d5;hpb=5b1b2196908c159d4a1339bce2682afa22700c35;p=r2c2.git diff --git a/source/libr2c2/train.cpp b/source/libr2c2/train.cpp index a45675c..1022722 100644 --- a/source/libr2c2/train.cpp +++ b/source/libr2c2/train.cpp @@ -206,15 +206,6 @@ void Train::remove_ai(TrainAI &ai) ais.erase(i); } -TrainAI *Train::get_tagged_ai(const string &tag) const -{ - for(list::const_iterator i=ais.begin(); i!=ais.end(); ++i) - if((*i)->get_tag()==tag) - return *i; - - return 0; -} - void Train::ai_message(const TrainAI::Message &msg) { for(list::iterator i=ais.begin(); i!=ais.end(); ++i) @@ -674,7 +665,7 @@ void Train::reserve_more() else if(&*start==pending_block) { TrackIter track = start.track_iter(); - if(!(track.endpoint().paths&(1<get_active_path()))) + if(!track.endpoint().has_path(track->get_active_path())) return; } @@ -736,11 +727,12 @@ void Train::reserve_more() { const TrackType::Endpoint &entry_ep = track.endpoint(); unsigned path = track->get_active_path(); - if(!(entry_ep.paths&(1<1; ++path, mask>>=1) ; track->set_active_path(path);