summaryrefslogtreecommitdiff
path: root/src/signal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal.cpp')
-rw-r--r--src/signal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal.cpp b/src/signal.cpp
index b7df907e6..187227b40 100644
--- a/src/signal.cpp
+++ b/src/signal.cpp
@@ -184,7 +184,7 @@ static SmallSet<DiagDirection, SIG_GLOB_SIZE> _globset("_globset"); ///< set of
/** Check whether there is a train on rail, not in a depot */
static Vehicle *TrainOnTileEnum(Vehicle *v, void *)
{
- if (v->type != VEH_TRAIN || ((Train *)v)->track == TRACK_BIT_DEPOT) return NULL;
+ if (v->type != VEH_TRAIN || Train::From(v)->track == TRACK_BIT_DEPOT) return NULL;
return v;
}