X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Flibr2c2%2Ftrackiter.cpp;h=31ebf08e1f1c59711208c0f51722480cbc529c46;hb=ada37f44b9c44d726ecc3467ecdfdeb1c4137e44;hp=c3bb7d4ae5db5e8ab16def585547dfec090cb101;hpb=bde934f7d5ba07a9442a305192e10024820d13ed;p=r2c2.git diff --git a/source/libr2c2/trackiter.cpp b/source/libr2c2/trackiter.cpp index c3bb7d4..31ebf08 100644 --- a/source/libr2c2/trackiter.cpp +++ b/source/libr2c2/trackiter.cpp @@ -30,27 +30,29 @@ BlockIter TrackIter::block_iter() const Block &block = _track->get_block(); const vector &beps = block.get_endpoints(); - if(_track->get_type().is_turnout()) - { - /* A turnouts is the only track in its block. Go ahead and find the - matching endpoint in the block. */ - for(unsigned i=0; iget_type().is_turnout()) { TrackIter rev = reverse(); + TrackIter last; while(rev && &rev.track()->get_block()==&block) { - TrackIter fwd = rev.reverse(); - - for(unsigned i=0; i