summaryrefslogtreecommitdiff
path: root/src/base_consist.h
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-05-17 23:31:59 +0200
committerMichael Lutz <michi@icosahedron.de>2020-05-21 20:02:34 +0200
commit63ccb36ef3ecd53a503c0e9fea87f0784802af0f (patch)
treed3e1134029fd437d1ad2d948f83592b930e9456f /src/base_consist.h
parent9b6f5e3bb850b6cff02cc761767fcdf49c681645 (diff)
downloadopenttd-63ccb36ef3ecd53a503c0e9fea87f0784802af0f.tar.xz
Codechange: Use std::string for most of the user-settable custom names.
Diffstat (limited to 'src/base_consist.h')
-rw-r--r--src/base_consist.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base_consist.h b/src/base_consist.h
index 619229d2a..a67b9fb6f 100644
--- a/src/base_consist.h
+++ b/src/base_consist.h
@@ -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);
};