diff options
author | rubidium <rubidium@openttd.org> | 2009-06-02 19:12:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-06-02 19:12:28 +0000 |
commit | 2fc0cb3e76ec36826056c661555b925b3ce43fe3 (patch) | |
tree | 3abde6b4e39242c5d4c8f255f5f4b8d4403b0b47 /src/vehicle_base.h | |
parent | 78a25e84e9d7935404f13c041e8a93c4e9b6ff47 (diff) | |
download | openttd-2fc0cb3e76ec36826056c661555b925b3ce43fe3.tar.xz |
(svn r16505) -Fix [FS#2951] (r16472): since g++ 4.4 the implicit (default) constructor will zero the whole class. This caused all vehicle indices to be 0, which causes all kinds of trouble.
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index b4a43e2ae..b6bcbb4b6 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -584,6 +584,8 @@ struct DisasterVehicle : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER uint16 image_override; VehicleID big_ufo_destroyer_target; + /** We don't want GCC to zero our struct! It already is zeroed and has an index! */ + DisasterVehicle() : SpecializedVehicle<DisasterVehicle, VEH_DISASTER>() {} /** We want to 'destruct' the right class. */ virtual ~DisasterVehicle() {} |