@@ -179,26 +179,25 @@ GRFError::GRFError(StringID severity, St
{
}
/**
* Create a new GRFError that is a deep copy of an existing error message.
* @param error The GRFError object to make a copy of.
*/
GRFError::GRFError(const GRFError &error) :
ZeroedMemoryAllocator(),
custom_message(error.custom_message),
data(error.data),
message(error.message),
severity(error.severity),
num_params(error.num_params)
severity(error.severity)
if (error.custom_message != NULL) this->custom_message = strdup(error.custom_message);
if (error.data != NULL) this->data = strdup(error.data);
memcpy(this->param_value, error.param_value, sizeof(this->param_value));
GRFError::~GRFError()
free(this->custom_message);
free(this->data);