(svn r21876) -Codechange: typedef SpecializedVehicleBase and GroundVehicleBase to reduce typing

This commit is contained in:
smatz
2011-01-21 14:43:38 +00:00
parent 656caf16db
commit 6dc24cf643
7 changed files with 10 additions and 6 deletions

View File

@@ -644,6 +644,8 @@ template <class T, VehicleType Type>
struct SpecializedVehicle : public Vehicle {
static const VehicleType EXPECTED_TYPE = Type; ///< Specialized type
typedef SpecializedVehicle<T, Type> SpecializedVehicleBase; ///< Our type
/**
* Set vehicle type correctly
*/
@@ -758,7 +760,7 @@ struct DisasterVehicle : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER
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>() {}
DisasterVehicle() : SpecializedVehicleBase() {}
/** We want to 'destruct' the right class. */
virtual ~DisasterVehicle() {}