diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-05-17 23:31:59 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-05-21 20:02:34 +0200 |
commit | 63ccb36ef3ecd53a503c0e9fea87f0784802af0f (patch) | |
tree | d3e1134029fd437d1ad2d948f83592b930e9456f /src/base_consist.cpp | |
parent | 9b6f5e3bb850b6cff02cc761767fcdf49c681645 (diff) | |
download | openttd-63ccb36ef3ecd53a503c0e9fea87f0784802af0f.tar.xz |
Codechange: Use std::string for most of the user-settable custom names.
Diffstat (limited to 'src/base_consist.cpp')
-rw-r--r-- | src/base_consist.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/base_consist.cpp b/src/base_consist.cpp index 462f63f2e..ad9d476b6 100644 --- a/src/base_consist.cpp +++ b/src/base_consist.cpp @@ -14,10 +14,6 @@ #include "safeguards.h" -BaseConsist::~BaseConsist() -{ - free(this->name); -} /** * Copy properties of other BaseConsist. @@ -27,8 +23,7 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src) { if (this == src) return; - free(this->name); - this->name = src->name != nullptr ? stredup(src->name) : nullptr; + this->name = src->name; this->current_order_time = src->current_order_time; this->lateness_counter = src->lateness_counter; |