X-Git-Url: http://git.tdb.fi/?p=r2c2.git;a=blobdiff_plain;f=source%2Flibr2c2%2Ftrackchain.cpp;h=0c3282ad4845a4893f2c776fef7d2f49d2c48413;hp=b256b705f95aa5bc21dceca556b767f3d962c676;hb=c52c0e591be55cb2c7251689c69c642e3cb3601c;hpb=d2333df8c914009f3ebdcc5e11402e6edccc924e diff --git a/source/libr2c2/trackchain.cpp b/source/libr2c2/trackchain.cpp index b256b70..0c3282a 100644 --- a/source/libr2c2/trackchain.cpp +++ b/source/libr2c2/trackchain.cpp @@ -135,6 +135,11 @@ bool TrackChain::has_track(Track &t) const return tracks.count(&t); } +bool TrackChain::is_loop() const +{ + return !tracks.empty() && !ends[0] && !ends[1]; +} + void TrackChain::object_removed(Object &obj) { if(Track *track = dynamic_cast(&obj))