summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-28 21:06:38 +0000
committerrubidium <rubidium@openttd.org>2009-07-28 21:06:38 +0000
commite473e69ba4d59df7f9cdd9a5010cf54a66fd5b90 (patch)
treea362d0c8540e1ecb4ba9ab1cc8c382106d972ac0 /src/waypoint_cmd.cpp
parentffa0c7d29d484094832a85e2e0cdbc2f9a9f2a18 (diff)
downloadopenttd-e473e69ba4d59df7f9cdd9a5010cf54a66fd5b90.tar.xz
(svn r16976) -Codechange: remove WaypointID and MAX_LENGTH constants in favour of their Station variants
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 30f23ac9e..bb18b9c14 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -44,7 +44,7 @@ void MakeDefaultWaypointName(Waypoint *wp)
{
uint32 used = 0; // bitmap of used waypoint numbers, sliding window with 'next' as base
uint32 next = 0; // first waypoint number in the bitmap
- WaypointID idx = 0; // index where we will stop
+ StationID idx = 0; // index where we will stop
wp->town = ClosestTownFromTile(wp->xy, UINT_MAX);
@@ -58,7 +58,7 @@ void MakeDefaultWaypointName(Waypoint *wp)
* If it wasn't using 'used' and 'idx', it would just search for increasing 'next',
* but this way it is faster */
- WaypointID cid = 0; // current index, goes to Waypoint::GetPoolSize()-1, then wraps to 0
+ StationID cid = 0; // current index, goes to Waypoint::GetPoolSize()-1, then wraps to 0
do {
Waypoint *lwp = Waypoint::GetIfValid(cid);
@@ -386,7 +386,7 @@ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
bool reset = StrEmpty(text);
if (!reset) {
- if (strlen(text) >= MAX_LENGTH_WAYPOINT_NAME_BYTES) return CMD_ERROR;
+ if (strlen(text) >= MAX_LENGTH_STATION_NAME_BYTES) return CMD_ERROR;
if (!IsUniqueWaypointName(text)) return_cmd_error(STR_NAME_MUST_BE_UNIQUE);
}