]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackiter.cpp
Perform check_slope automatically with certain operations
[r2c2.git] / source / libr2c2 / trackiter.cpp
index 64d223e21cc3ce6142061ab7efc670e3fbd715f5..c3bb7d4ae5db5e8ab16def585547dfec090cb101 100644 (file)
@@ -70,7 +70,7 @@ int TrackIter::get_exit(unsigned path) const
        
        // Find an endpoint that's connected to the entry and has the requested path
        for(unsigned i=0; i<eps.size(); ++i)
-               if(i!=_entry && (eps[i].paths&(1<<path)) && (eps[i].paths&eps[_entry].paths))
+               if(i!=_entry && eps[i].has_path(path) && eps[i].has_common_paths(eps[_entry]))
                        return i;
 
        return -1;
@@ -95,7 +95,7 @@ TrackIter TrackIter::next(unsigned path) const
 
        TrackIter result;
        result._track = _track->get_link(exit);
-       result._entry = (result._track ? result._track->get_endpoint_by_link(*_track) : 0);
+       result._entry = (result._track ? result._track->get_link_slot(*_track) : 0);
 
        return result;
 }
@@ -127,7 +127,7 @@ TrackIter TrackIter::flip() const
 
        TrackIter result;
        result._track = _track->get_link(_entry);
-       result._entry = (result._track ? result._track->get_endpoint_by_link(*_track) : 0);
+       result._entry = (result._track ? result._track->get_link_slot(*_track) : 0);
 
        return result;
 }