diff --git a/src/base_consist.h b/src/base_consist.h --- a/src/base_consist.h +++ b/src/base_consist.h @@ -12,10 +12,11 @@ #include "order_type.h" #include "date_type.h" +#include /** Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist. */ struct BaseConsist { - char *name; ///< Name of vehicle + std::string name; ///< Name of vehicle /* Used for timetabling. */ uint32 current_order_time; ///< How many ticks have passed since this order started. @@ -29,8 +30,7 @@ struct BaseConsist { uint16 vehicle_flags; ///< Used for gradual loading and other miscellaneous things (@see VehicleFlags enum) - BaseConsist() : name(nullptr) {} - virtual ~BaseConsist(); + virtual ~BaseConsist() {} void CopyConsistPropertiesFrom(const BaseConsist *src); };