Codechange: Use std::string for most of the user-settable custom names.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user