Codechange: Use std::string for most of the user-settable custom names.

This commit is contained in:
Michael Lutz
2020-05-17 23:31:59 +02:00
parent 9b6f5e3bb8
commit 63ccb36ef3
41 changed files with 160 additions and 177 deletions

View File

@@ -12,10 +12,11 @@
#include "order_type.h"
#include "date_type.h"
#include <string>
/** 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);
};