diff options
author | rubidium <rubidium@openttd.org> | 2009-12-02 09:31:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-02 09:31:38 +0000 |
commit | ef8cc49175ae8f97c6659c3acd13fdb4434cd535 (patch) | |
tree | 70b95a04f49f1755580f2d0a31bf7ec47df717ad /src/pathfinder/opf | |
parent | 250c355508ea280d89ad0004e715831b59522419 (diff) | |
download | openttd-ef8cc49175ae8f97c6659c3acd13fdb4434cd535.tar.xz |
(svn r18370) -Codechange: push some constness/type strictness into the ship pathfinders
Diffstat (limited to 'src/pathfinder/opf')
-rw-r--r-- | src/pathfinder/opf/opf_ship.cpp | 4 | ||||
-rw-r--r-- | src/pathfinder/opf/opf_ship.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp index cbc4a99f4..0d967c67a 100644 --- a/src/pathfinder/opf/opf_ship.cpp +++ b/src/pathfinder/opf/opf_ship.cpp @@ -131,7 +131,7 @@ static const byte _ship_search_directions[6][4] = { static const byte _pick_shiptrack_table[6] = {1, 3, 2, 2, 0, 0}; -static uint FindShipTrack(Ship *v, TileIndex tile, DiagDirection dir, TrackBits bits, TileIndex skiptile, Track *track) +static uint FindShipTrack(const Ship *v, TileIndex tile, DiagDirection dir, TrackBits bits, TileIndex skiptile, Track *track) { TrackPathFinder pfs; uint best_bird_dist = 0; @@ -183,7 +183,7 @@ bad:; /** returns the track to choose on the next tile, or -1 when it's better to * reverse. The tile given is the tile we are about to enter, enterdir is the * direction in which we are entering the tile */ -Track OPFShipChooseTrack(Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks) +Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks) { assert(IsValidDiagDirection(enterdir)); diff --git a/src/pathfinder/opf/opf_ship.h b/src/pathfinder/opf/opf_ship.h index 829417b38..10055067b 100644 --- a/src/pathfinder/opf/opf_ship.h +++ b/src/pathfinder/opf/opf_ship.h @@ -20,6 +20,6 @@ * @param tracks available tracks on the new tile (to choose from) * @return the best trackdir for next turn or INVALID_TRACK if the path could not be found */ -Track OPFShipChooseTrack(Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks); +Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks); #endif /* OPF_SHIP_H */ |