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

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