- // Move blocks up to the next sensor to our current blocks
- for(BlockList::iterator j=cur_blocks_end; j!=end; ++j)
- train.signal_advanced.emit(**j);
+ /* Advance the train to the new blocks. Update cur_blocks_end first
+ to keep things in sync. */
+ SetFlag setf(advancing);
+ BlockList::iterator i = cur_blocks_end;