summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-02 09:31:38 +0000
committerrubidium <rubidium@openttd.org>2009-12-02 09:31:38 +0000
commitef8cc49175ae8f97c6659c3acd13fdb4434cd535 (patch)
tree70b95a04f49f1755580f2d0a31bf7ec47df717ad /src/pathfinder/npf
parent250c355508ea280d89ad0004e715831b59522419 (diff)
downloadopenttd-ef8cc49175ae8f97c6659c3acd13fdb4434cd535.tar.xz
(svn r18370) -Codechange: push some constness/type strictness into the ship pathfinders
Diffstat (limited to 'src/pathfinder/npf')
-rw-r--r--src/pathfinder/npf/npf.cpp4
-rw-r--r--src/pathfinder/npf/npf.h2
-rw-r--r--src/pathfinder/npf/npf_func.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 085a00053..13410a0f5 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -1100,7 +1100,7 @@ void InitializeNPF()
_npf_aystar.max_search_nodes = _settings_game.pf.npf.npf_max_search_nodes;
}
-void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, Vehicle *v, bool reserve_path)
+void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, const Vehicle *v, bool reserve_path)
{
/* Ships don't really reach their stations, but the tile in front. So don't
* save the station id for ships. For roadvehs we don't store it either,
@@ -1122,7 +1122,7 @@ void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, Vehicle *v, bool reser
/*** Ships ***/
-Track NPFShipChooseTrack(Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
+Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
{
NPFFindStationOrTileData fstd;
Trackdir trackdir = v->GetVehicleTrackdir();
diff --git a/src/pathfinder/npf/npf.h b/src/pathfinder/npf/npf.h
index 3beb09391..fcd75db4d 100644
--- a/src/pathfinder/npf/npf.h
+++ b/src/pathfinder/npf/npf.h
@@ -125,7 +125,7 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
NPFFoundTargetData NPFRouteToSafeTile(const struct Train *v, TileIndex tile, Trackdir trackdir, bool override_railtype);
-void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, Vehicle *v, bool reserve_path = false);
+void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, const Vehicle *v, bool reserve_path = false);
/*
diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h
index 4d38d5807..ef3b1001c 100644
--- a/src/pathfinder/npf/npf_func.h
+++ b/src/pathfinder/npf/npf_func.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 NPFShipChooseTrack(class Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
+Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
#endif /* NPF_FUNC_H */