(svn r16907) -Codechange: make a more clear distinction between reservation functions that return a bool and that return TrackBits; GetRailStationReservation vs GetRailwayStationReservation, which one returns the bool and which one the TrackBits?

This commit is contained in:
rubidium
2009-07-21 22:37:10 +00:00
parent 2399f91f62
commit f1d6561cc4
15 changed files with 57 additions and 57 deletions

View File

@@ -137,7 +137,7 @@ struct CFollowTrackT
/* Check skipped station tiles as well. */
TileIndexDiff diff = TileOffsByDiagDir(m_exitdir);
for (TileIndex tile = m_new_tile - diff * m_tiles_skipped; tile != m_new_tile; tile += diff) {
if (GetRailwayStationReservation(tile)) {
if (HasStationReservation(tile)) {
m_new_td_bits = TRACKDIR_BIT_NONE;
m_err = EC_RESERVED;
return false;

View File

@@ -153,7 +153,7 @@ public:
{
TileIndexDiff diff = TileOffsByDiagDir(TrackdirToExitdir(ReverseTrackdir(trackdir)));
for (; skipped >= 0; skipped--, tile += diff) {
if (GetRailwayStationReservation(tile)) return true;
if (HasStationReservation(tile)) return true;
}
return false;
}

View File

@@ -69,7 +69,7 @@ private:
TileIndexDiff diff = TileOffsByDiagDir(dir);
do {
if (GetRailwayStationReservation(tile)) return false;
if (HasStationReservation(tile)) return false;
SetRailwayStationReservation(tile, true);
MarkTileDirtyByTile(tile);
tile = TILE_ADD(tile, diff);