diff options
author | tron <tron@openttd.org> | 2006-08-31 10:36:59 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-31 10:36:59 +0000 |
commit | d16308810efd2ba5b7e09b24cb3d0c68c258ac49 (patch) | |
tree | 544705b38191d711e7788ce7d7af6a80329163e7 | |
parent | d0693f3c301cd93bd4d97f069ad000a778f28ca8 (diff) | |
download | openttd-d16308810efd2ba5b7e09b24cb3d0c68c258ac49.tar.xz |
(svn r6264) Get rid of a cast
-rw-r--r-- | rail_cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 6e8ca0c16..630375083 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1455,8 +1455,10 @@ typedef struct SetSignalsData { } SetSignalsData; -static bool SetSignalsEnumProc(TileIndex tile, SetSignalsData *ssd, int track, uint length, byte *state) +static bool SetSignalsEnumProc(TileIndex tile, void* data, int track, uint length, byte* state) { + SetSignalsData* ssd = data; + if (!IsTileType(tile, MP_RAILWAY)) return false; // the tile has signals? @@ -1672,7 +1674,7 @@ bool UpdateSignalsOnSegment(TileIndex tile, DiagDirection direction) ssd.cur = ssd.presignal_exits = ssd.presignal_exits_free = 0; ssd.has_presignal = false; - FollowTrack(tile, 0xC000 | TRANSPORT_RAIL, direction, (TPFEnumProc*)SetSignalsEnumProc, SetSignalsAfterProc, &ssd); + FollowTrack(tile, 0xC000 | TRANSPORT_RAIL, direction, SetSignalsEnumProc, SetSignalsAfterProc, &ssd); ChangeSignalStates(&ssd); // remember the result only for the first iteration. |