summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-21 22:37:10 +0000
committerrubidium <rubidium@openttd.org>2009-07-21 22:37:10 +0000
commit8405d7d7e762546e3e78d1e0c16bb226c36266fa (patch)
tree11d3829fce669b25be64f203da5d93319a0c3cdc /src/yapf
parent8083d67780d6a85c558080ec99dd2d24ae755d0f (diff)
downloadopenttd-8405d7d7e762546e3e78d1e0c16bb226c36266fa.tar.xz
(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?
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/follow_track.hpp2
-rw-r--r--src/yapf/yapf_costrail.hpp2
-rw-r--r--src/yapf/yapf_rail.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp
index cce1769e5..42646afea 100644
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -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;
diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp
index faf439ff2..dcf9a602a 100644
--- a/src/yapf/yapf_costrail.hpp
+++ b/src/yapf/yapf_costrail.hpp
@@ -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;
}
diff --git a/src/yapf/yapf_rail.cpp b/src/yapf/yapf_rail.cpp
index d5a5f51a2..e6df394ea 100644
--- a/src/yapf/yapf_rail.cpp
+++ b/src/yapf/yapf_rail.cpp
@@ -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);