summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train.h b/src/train.h
index bcf005472..b52b52396 100644
--- a/src/train.h
+++ b/src/train.h
@@ -314,6 +314,8 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
RailTypeByte railtype;
RailTypes compatible_railtypes;
+ /** We don't want GCC to zero our struct! It already is zeroed and has an index! */
+ Train() : SpecializedVehicle<Train, VEH_TRAIN>() {}
/** We want to 'destruct' the right class. */
virtual ~Train() { this->PreDestructor(); }