(svn r13941) -Codechange [YAPP]: Added YAPP-related penalties to YAPF. (michi_cc)

This commit is contained in:
rubidium
2008-08-02 22:51:07 +00:00
parent 74b770a96a
commit 27cfb68d93
4 changed files with 82 additions and 40 deletions

View File

@@ -589,6 +589,19 @@ static inline bool TracksOverlap(TrackBits bits)
return bits != TRACK_BIT_HORZ && bits != TRACK_BIT_VERT;
}
/**
* Check if a given track is contained within or overlaps some other tracks.
*
* @param tracks Tracks to be testet against
* @param track The track to test
* @return true if the track is already in the tracks or overlaps the tracks.
*/
static inline bool TrackOverlapsTracks(TrackBits tracks, Track track)
{
if (HasBit(tracks, track)) return true;
return TracksOverlap(tracks | TrackToTrackBits(track));
}
/**
* Checks whether the trackdir means that we are reversing.
* @param dir the trackdir to check