X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblock.cpp;h=386f2378a3b20011733cb54a17880cdd64a2d50b;hb=54392d65e2053d1eacb4cfcc435f1013993f2973;hp=8bab92c1f87f63159ebda4f221cc0e1535de2d39;hpb=ca9d278f9472206ad9a01190dcef9f0eb1bcc274;p=r2c2.git diff --git a/source/libr2c2/block.cpp b/source/libr2c2/block.cpp index 8bab92c..386f237 100644 --- a/source/libr2c2/block.cpp +++ b/source/libr2c2/block.cpp @@ -52,7 +52,7 @@ Block::Block(Layout &l, Track &start): { unsigned path = 1<=endpoints.size()) throw out_of_range("Block::get_path_length"); - TrackIter t_iter(endpoints[entry].track, endpoints[entry].track_ep); + TrackIter t_iter = endpoints[entry].track_iter(); float result = 0; while(t_iter && has_track(*t_iter)) @@ -185,7 +185,7 @@ void Block::tick(const Time::TimeDelta &dt) } } -void Block::find_paths(TrackIter track, unsigned path) +void Block::find_paths(const TrackIter &track, unsigned path) { unsigned mask = track.endpoint().paths; for(unsigned i=0; mask>>i; ++i) @@ -254,4 +254,9 @@ Block::Endpoint::Endpoint(Track *t, unsigned e): paths(0) { } +TrackIter Block::Endpoint::track_iter() const +{ + return TrackIter(track, track_ep); +} + } // namespace R2C2