(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.
This commit is contained in:
@@ -133,6 +133,8 @@ struct RoadVehicle : public SpecializedVehicle<RoadVehicle, VEH_ROAD> {
|
||||
RoadType roadtype;
|
||||
RoadTypes compatible_roadtypes;
|
||||
|
||||
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
||||
RoadVehicle() : SpecializedVehicle<RoadVehicle, VEH_ROAD>() {}
|
||||
/** We want to 'destruct' the right class. */
|
||||
virtual ~RoadVehicle() { this->PreDestructor(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user