1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r24443) -Codechange: Move Vehicle::name to BaseConsist.

This commit is contained in:
frosch
2012-07-29 16:45:11 +00:00
parent 4c9f65800b
commit 48e0d9901f
5 changed files with 12 additions and 9 deletions

View File

@@ -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;
}