Codechange: Use HasTrack(dir) to improve code readability.

This commit is contained in:
J0anJosep
2018-05-12 18:19:40 +02:00
committed by frosch
parent 31ac11bddb
commit d01c09fb73
7 changed files with 31 additions and 9 deletions

View File

@@ -142,7 +142,7 @@ public:
/** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node &n)
{
return (n.m_key.m_tile == m_destTile) && ((m_destTrackdirs & TrackdirToTrackdirBits(n.GetTrackdir())) != TRACKDIR_BIT_NONE);
return (n.m_key.m_tile == m_destTile) && HasTrackdir(m_destTrackdirs, n.GetTrackdir());
}
/**