diff options
author | frosch <frosch@openttd.org> | 2012-07-29 16:45:11 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-07-29 16:45:11 +0000 |
commit | 48e0d9901fba132ee532252f75ee00b242af5a31 (patch) | |
tree | e57d0ca87ba1ba06b47124f2ba9c7e6bfaec2717 /src/base_consist.cpp | |
parent | 4c9f65800be7f5a05722c18c559d74e3c1fe6711 (diff) | |
download | openttd-48e0d9901fba132ee532252f75ee00b242af5a31.tar.xz |
(svn r24443) -Codechange: Move Vehicle::name to BaseConsist.
Diffstat (limited to 'src/base_consist.cpp')
-rw-r--r-- | src/base_consist.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base_consist.cpp b/src/base_consist.cpp index def120fe1..93b97e10e 100644 --- a/src/base_consist.cpp +++ b/src/base_consist.cpp @@ -12,6 +12,11 @@ #include "stdafx.h" #include "base_consist.h" +BaseConsist::~BaseConsist() +{ + free(this->name); +} + /** * Copy properties of other BaseConsist. * @param src Source for copying @@ -20,6 +25,9 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src) { if (this == src) return; + free(this->name); + this->name = src->name != NULL ? strdup(src->name) : NULL; + this->service_interval = src->service_interval; this->cur_real_order_index = src->cur_real_order_index; } |